forked from Minki/linux
[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>
This commit is contained in:
parent
45e15bb734
commit
6fc30db563
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user