summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/nxp
diff options
context:
space:
mode:
authorWei Yongjun <weiyongjun1@huawei.com>2020-04-27 12:15:07 +0000
committerDavid S. Miller <davem@davemloft.net>2020-04-30 20:29:39 -0700
commit88ec7cb22ddde725ed4ce15991f0bd9dd817fd85 (patch)
treef3acf9c224d64a96cd66a1b97c0c3862297aa708 /drivers/net/ethernet/nxp
parentf8d530ac29fe9248f5e58ca5bcf4c368f8393ccf (diff)
downloadlwn-88ec7cb22ddde725ed4ce15991f0bd9dd817fd85.tar.gz
lwn-88ec7cb22ddde725ed4ce15991f0bd9dd817fd85.zip
net: lpc-enet: fix error return code in lpc_mii_init()
Fix to return a negative error code from the error handling case instead of 0, as done elsewhere in this function. Fixes: b7370112f519 ("lpc32xx: Added ethernet driver") Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com> Acked-by: Vladimir Zapolskiy <vz@mleia.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/nxp')
-rw-r--r--drivers/net/ethernet/nxp/lpc_eth.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/ethernet/nxp/lpc_eth.c b/drivers/net/ethernet/nxp/lpc_eth.c
index d20cf03a3ea0..311454d9b0bc 100644
--- a/drivers/net/ethernet/nxp/lpc_eth.c
+++ b/drivers/net/ethernet/nxp/lpc_eth.c
@@ -823,7 +823,8 @@ static int lpc_mii_init(struct netdata_local *pldat)
if (err)
goto err_out_unregister_bus;
- if (lpc_mii_probe(pldat->ndev) != 0)
+ err = lpc_mii_probe(pldat->ndev);
+ if (err)
goto err_out_unregister_bus;
return 0;