projects
/
platform
/
kernel
/
linux-3.10.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
45e15bb
)
[netdrvr] smc91x: fix resource removal (null ptr deref)
author
Jeff Garzik
<jeff@garzik.org>
Wed, 27 Aug 2008 09:54:30 +0000
(
05:54
-0400)
committer
Jeff Garzik
<jgarzik@redhat.com>
Wed, 27 Aug 2008 09:54:30 +0000
(
05:54
-0400)
Properly handle resource cleanup on unplug/exit.
Spotted by Jonathan Cameron
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
drivers/net/smc91x.c
patch
|
blob
|
history
diff --git
a/drivers/net/smc91x.c
b/drivers/net/smc91x.c
index
2040965
..
24768c1
100644
(file)
--- a/
drivers/net/smc91x.c
+++ b/
drivers/net/smc91x.c
@@
-2255,7
+2255,7
@@
static int smc_drv_remove(struct platform_device *pdev)
res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "smc91x-regs");
if (!res)
- platform_get_resource(pdev, IORESOURCE_MEM, 0);
+
res =
platform_get_resource(pdev, IORESOURCE_MEM, 0);
release_mem_region(res->start, SMC_IO_EXTENT);
free_netdev(ndev);