From: Wei Yongjun Date: Thu, 11 Apr 2013 16:42:40 +0000 (+0000) Subject: net/at91_ether: fix error return code in at91ether_probe() X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=bbeae58c291a3dedc0b7ae9ffbc8763ed63fcd7f;p=linux-beck.git net/at91_ether: fix error return code in at91ether_probe() Fix to return a negative error code from the error handling case instead of 0, as returned elsewhere in this function. Signed-off-by: Wei Yongjun Signed-off-by: David S. Miller --- diff --git a/drivers/net/ethernet/cadence/at91_ether.c b/drivers/net/ethernet/cadence/at91_ether.c index a5f499f53dd6..cc9a185f0abb 100644 --- a/drivers/net/ethernet/cadence/at91_ether.c +++ b/drivers/net/ethernet/cadence/at91_ether.c @@ -394,7 +394,8 @@ static int __init at91ether_probe(struct platform_device *pdev) if (res) goto err_disable_clock; - if (macb_mii_init(lp) != 0) + res = macb_mii_init(lp); + if (res) goto err_out_unregister_netdev; /* will be enabled in open() */