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>
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);