提交 c639b9fb 编写于 作者: W Wei Yongjun 提交者: Greg Kroah-Hartman

Staging: netlogic: fix missing free_netdev() on error in xlr_net_probe()

Fix missing free_netdev() before return from function xlr_net_probe()
in the devm_ioremap_resource() error handling case.
Signed-off-by: NWei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 d0941b1e
......@@ -1023,9 +1023,8 @@ static int xlr_net_probe(struct platform_device *pdev)
ndev->base_addr = (unsigned long) devm_ioremap_resource
(&pdev->dev, res);
if (IS_ERR_VALUE(ndev->base_addr)) {
dev_err(&pdev->dev,
"devm_ioremap_resource failed\n");
return ndev->base_addr;
err = ndev->base_addr;
goto err_gmac;
}
res = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册