net/at91_ether: fix error return code in at91ether_probe()
authorWei Yongjun <yongjun_wei@trendmicro.com.cn>
Thu, 11 Apr 2013 16:42:40 +0000 (16:42 +0000)
committerDavid S. Miller <davem@davemloft.net>
Fri, 12 Apr 2013 22:23:33 +0000 (18:23 -0400)
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 <yongjun_wei@trendmicro.com.cn>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/cadence/at91_ether.c

index a5f499f53dd67560f25829be1f47460c8bf10c28..cc9a185f0abbc03dfb9265a86a2d9fa13b07ba10 100644 (file)
@@ -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() */