summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/nxp
diff options
context:
space:
mode:
authorWei Yongjun <weiyongjun1@huawei.com>2020-04-27 14:15:07 +0200
committerDavid S. Miller <davem@davemloft.net>2020-05-01 05:29:39 +0200
commit88ec7cb22ddde725ed4ce15991f0bd9dd817fd85 (patch)
treef3acf9c224d64a96cd66a1b97c0c3862297aa708 /drivers/net/ethernet/nxp
parentice: Fix error return code in ice_add_prof() (diff)
downloadlinux-88ec7cb22ddde725ed4ce15991f0bd9dd817fd85.tar.xz
linux-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;