diff options
author | Wei Yongjun <weiyj.lk@gmail.com> | 2013-06-19 10:29:59 +0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-06-19 09:41:37 -0700 |
commit | c639b9fbe3e33656c66a62cb52a446181fd1babf (patch) | |
tree | df9cc7441ef6a4584485ca52862ecd0c8814739c | |
parent | d0941b1e07c129da4afc725c2c982b97e99e040f (diff) |
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>
-rw-r--r-- | drivers/staging/netlogic/xlr_net.c | 5 |
1 files changed, 2 insertions, 3 deletions
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); |