OSDN Git Service
(root)
/
uclinux-h8
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d6d211d
)
firewire: net: fix NULL derefencing in fwnet_probe()
author
Daeseok Youn
<daeseok.youn@gmail.com>
Tue, 29 Apr 2014 09:49:47 +0000
(18:49 +0900)
committer
Stefan Richter
<stefanr@s5r6.in-berlin.de>
Mon, 12 May 2014 12:35:31 +0000
(14:35 +0200)
"dev" and "net" are NULL when alloc_netdev() is failed.
So just unlock and return an error.
Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com>
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
drivers/firewire/net.c
patch
|
blob
|
history
diff --git
a/drivers/firewire/net.c
b/drivers/firewire/net.c
index
4af0a7b
..
c398645
100644
(file)
--- a/
drivers/firewire/net.c
+++ b/
drivers/firewire/net.c
@@
-1462,8
+1462,8
@@
static int fwnet_probe(struct fw_unit *unit,
net = alloc_netdev(sizeof(*dev), "firewire%d", fwnet_init_dev);
if (net == NULL) {
-
ret = -ENOMEM
;
-
goto out
;
+
mutex_unlock(&fwnet_device_mutex)
;
+
return -ENOMEM
;
}
allocated_netdev = true;