Commit 6fc30db5 authored by Jeff Garzik's avatar Jeff Garzik Committed by Jeff Garzik

[netdrvr] smc91x: fix resource removal (null ptr deref)

Properly handle resource cleanup on unplug/exit.

Spotted by Jonathan Cameron
Signed-off-by: default avatarJeff Garzik <jgarzik@redhat.com>
parent 45e15bb7
...@@ -2255,7 +2255,7 @@ static int smc_drv_remove(struct platform_device *pdev) ...@@ -2255,7 +2255,7 @@ static int smc_drv_remove(struct platform_device *pdev)
res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "smc91x-regs"); res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "smc91x-regs");
if (!res) 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); release_mem_region(res->start, SMC_IO_EXTENT);
free_netdev(ndev); free_netdev(ndev);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment