aboutsummaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorJeff Garzik <jeff@garzik.org>2008-08-27 05:54:30 -0400
committerJeff Garzik <jgarzik@redhat.com>2008-08-27 05:54:30 -0400
commit6fc30db563c57e383ca2ec836d8c9208c52d265a (patch)
tree9d96ba795407fe8dd4b40ad37104ff115e2b3b50 /drivers
parent45e15bb734e4e559ab32f26196e44d5cf1417f10 (diff)
[netdrvr] smc91x: fix resource removal (null ptr deref)
Properly handle resource cleanup on unplug/exit. Spotted by Jonathan Cameron Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/smc91x.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/smc91x.c b/drivers/net/smc91x.c
index 2040965d772..24768c10cad 100644
--- 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);