projects
/
GitHub
/
exynos8895
/
android_kernel_samsung_universal8895.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
|
blame
|
history
diff --git
a/drivers/firewire/net.c
b/drivers/firewire/net.c
index 4af0a7bad7f21561cc4e7a29031c238a34f0135d..c3986452194dd01ee4fed4b4bff14f9f5813523d 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;