Commit c639b9fb authored by Wei Yongjun's avatar Wei Yongjun Committed by 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: default avatarWei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent d0941b1e
...@@ -1023,9 +1023,8 @@ static int xlr_net_probe(struct platform_device *pdev) ...@@ -1023,9 +1023,8 @@ static int xlr_net_probe(struct platform_device *pdev)
ndev->base_addr = (unsigned long) devm_ioremap_resource ndev->base_addr = (unsigned long) devm_ioremap_resource
(&pdev->dev, res); (&pdev->dev, res);
if (IS_ERR_VALUE(ndev->base_addr)) { if (IS_ERR_VALUE(ndev->base_addr)) {
dev_err(&pdev->dev, err = ndev->base_addr;
"devm_ioremap_resource failed\n"); goto err_gmac;
return ndev->base_addr;
} }
res = platform_get_resource(pdev, IORESOURCE_IRQ, 0); res = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
......
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