diff options
author | Jeff Garzik <jeff@garzik.org> | 2008-08-27 05:54:30 -0400 |
---|---|---|
committer | Jeff Garzik <jgarzik@redhat.com> | 2008-08-27 05:54:30 -0400 |
commit | 6fc30db563c57e383ca2ec836d8c9208c52d265a (patch) | |
tree | 9d96ba795407fe8dd4b40ad37104ff115e2b3b50 /drivers/net/smc91x.c | |
parent | 45e15bb734e4e559ab32f26196e44d5cf1417f10 (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/net/smc91x.c')
-rw-r--r-- | drivers/net/smc91x.c | 2 |
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) | |||
2255 | 2255 | ||
2256 | res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "smc91x-regs"); | 2256 | res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "smc91x-regs"); |
2257 | if (!res) | 2257 | if (!res) |
2258 | platform_get_resource(pdev, IORESOURCE_MEM, 0); | 2258 | res = platform_get_resource(pdev, IORESOURCE_MEM, 0); |
2259 | release_mem_region(res->start, SMC_IO_EXTENT); | 2259 | release_mem_region(res->start, SMC_IO_EXTENT); |
2260 | 2260 | ||
2261 | free_netdev(ndev); | 2261 | free_netdev(ndev); |