lpc_eth: fix error return code in lpc_eth_drv_probe()
authorWei Yongjun <yongjun_wei@trendmicro.com.cn>
Wed, 20 Mar 2013 02:21:48 +0000 (02:21 +0000)
committerDavid S. Miller <davem@davemloft.net>
Wed, 20 Mar 2013 16:19:15 +0000 (12:19 -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/nxp/lpc_eth.c

index c4122c86f829293cc60d6dd48c72602d7dded49f..efa29b712d5f1bdc9793648ebd76f9201cc3f99a 100644 (file)
@@ -1472,7 +1472,8 @@ static int lpc_eth_drv_probe(struct platform_device *pdev)
        }
        platform_set_drvdata(pdev, ndev);
 
-       if (lpc_mii_init(pldat) != 0)
+       ret = lpc_mii_init(pldat);
+       if (ret)
                goto err_out_unregister_netdev;
 
        netdev_info(ndev, "LPC mac at 0x%08x irq %d\n",