From: Wei Yongjun Date: Wed, 19 Jun 2013 02:29:59 +0000 (+0800) Subject: Staging: netlogic: fix missing free_netdev() on error in xlr_net_probe() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=c639b9fbe3e33656c66a62cb52a446181fd1babf;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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 Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/netlogic/xlr_net.c b/drivers/staging/netlogic/xlr_net.c index b529d79d0661..af9e3f1d3a85 100644 --- a/drivers/staging/netlogic/xlr_net.c +++ b/drivers/staging/netlogic/xlr_net.c @@ -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);