summaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorJisheng Zhang <jszhang@kernel.org>2022-01-27 00:52:15 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-02-16 12:51:44 +0100
commitcf9de6a36b01c25e0c03f92fc09af060ed813304 (patch)
treed302c88a8d4fda6141009a43d74dc9cbb97fe01d /drivers/net
parent711cd738414029f9867d5d5e847b91b986c68a61 (diff)
downloadlinux-stable-cf9de6a36b01c25e0c03f92fc09af060ed813304.tar.gz
linux-stable-cf9de6a36b01c25e0c03f92fc09af060ed813304.tar.bz2
linux-stable-cf9de6a36b01c25e0c03f92fc09af060ed813304.zip
net: stmmac: dwmac-sun8i: use return val of readl_poll_timeout()
[ Upstream commit 9e0db41e7a0b6f1271cbcfb16dbf5b8641b4e440 ] When readl_poll_timeout() timeout, we'd better directly use its return value. Before this patch: [ 2.145528] dwmac-sun8i: probe of 4500000.ethernet failed with error -14 After this patch: [ 2.138520] dwmac-sun8i: probe of 4500000.ethernet failed with error -110 Signed-off-by: Jisheng Zhang <jszhang@kernel.org> Acked-by: Jernej Skrabec <jernej.skrabec@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c
index 4382deaeb570..0137cba2cb54 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c
@@ -712,7 +712,7 @@ static int sun8i_dwmac_reset(struct stmmac_priv *priv)
if (err) {
dev_err(priv->device, "EMAC reset timeout\n");
- return -EFAULT;
+ return err;
}
return 0;
}