projects
/
GitHub
/
LineageOS
/
G12
/
android_kernel_amlogic_linux-4.9.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
|
blame
|
history
diff --git
a/drivers/net/smc91x.c
b/drivers/net/smc91x.c
index 2040965d7724bc29fd0cc92532ca9e65dded071c..24768c10cadb7d1e326b3651ce6819ec08021699 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);