提交 6fc30db5 编写于 作者: J Jeff Garzik 提交者: Jeff Garzik

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

Properly handle resource cleanup on unplug/exit.

Spotted by Jonathan Cameron
Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
上级 45e15bb7
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册