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 | |
parent | 45e15bb734e4e559ab32f26196e44d5cf1417f10 (diff) | |
download | op-kernel-dev-6fc30db563c57e383ca2ec836d8c9208c52d265a.zip op-kernel-dev-6fc30db563c57e383ca2ec836d8c9208c52d265a.tar.gz |
[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')
-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 2040965..24768c1 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); |