summaryrefslogtreecommitdiffstats
path: root/drivers/net/smc91x.c
diff options
context:
space:
mode:
authorJeff Garzik <jeff@garzik.org>2008-08-27 11:54:30 +0200
committerJeff Garzik <jgarzik@redhat.com>2008-08-27 11:54:30 +0200
commit6fc30db563c57e383ca2ec836d8c9208c52d265a (patch)
tree9d96ba795407fe8dd4b40ad37104ff115e2b3b50 /drivers/net/smc91x.c
parentibmveth: fix bad UDP checksums (diff)
downloadlinux-6fc30db563c57e383ca2ec836d8c9208c52d265a.tar.xz
linux-6fc30db563c57e383ca2ec836d8c9208c52d265a.zip
[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/net/smc91x.c')
-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 2040965d7724..24768c10cadb 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);