Skip to content

Commit

Permalink
[netdrvr] smc91x: fix resource removal (null ptr deref)
Browse files Browse the repository at this point in the history
Properly handle resource cleanup on unplug/exit.

Spotted by Jonathan Cameron

Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
  • Loading branch information
Jeff Garzik authored and Jeff Garzik committed Aug 27, 2008
1 parent 45e15bb commit 6fc30db
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/smc91x.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 6fc30db

Please sign in to comment.