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: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
d0941b1e07
commit
c639b9fbe3
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user