projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7d8e76b
)
net: caif: spi: fix potential NULL dereference
author
Vasiliy Kulikov
<segoon@openwall.com>
Thu, 18 Nov 2010 18:35:58 +0000
(10:35 -0800)
committer
David S. Miller
<davem@davemloft.net>
Thu, 18 Nov 2010 18:35:58 +0000
(10:35 -0800)
alloc_netdev() is not checked here for NULL return value. dev is
check instead. It might lead to NULL dereference of ndev.
Signed-off-by: Vasiliy Kulikov <segoon@openwall.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/caif/caif_spi.c
patch
|
blob
|
history
diff --git
a/drivers/net/caif/caif_spi.c
b/drivers/net/caif/caif_spi.c
index 8b4cea57a6c5c47f585f5fcae935771e575dcd18..20da1996d354d563d8a2616276de477041b2368d 100644
(file)
--- a/
drivers/net/caif/caif_spi.c
+++ b/
drivers/net/caif/caif_spi.c
@@
-635,8
+635,8
@@
int cfspi_spi_probe(struct platform_device *pdev)
ndev = alloc_netdev(sizeof(struct cfspi),
"cfspi%d", cfspi_setup);
- if (!dev)
- return -ENO
DEV
;
+ if (!
n
dev)
+ return -ENO
MEM
;
cfspi = netdev_priv(ndev);
netif_stop_queue(ndev);