diff options
author | Jisheng Zhang <jszhang@kernel.org> | 2022-01-27 00:52:15 +0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-02-16 12:51:44 +0100 |
commit | cf9de6a36b01c25e0c03f92fc09af060ed813304 (patch) | |
tree | d302c88a8d4fda6141009a43d74dc9cbb97fe01d /drivers/net | |
parent | 711cd738414029f9867d5d5e847b91b986c68a61 (diff) | |
download | linux-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.c | 2 |
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; } |