]> git.baikalelectronics.ru Git - kernel.git/commitdiff
net: stmmac: dwmac-sun8i: use return val of readl_poll_timeout()
authorJisheng Zhang <jszhang@kernel.org>
Wed, 26 Jan 2022 16:52:15 +0000 (00:52 +0800)
committerDavid S. Miller <davem@davemloft.net>
Thu, 27 Jan 2022 13:51:10 +0000 (13:51 +0000)
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>
drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c

index 617d0e4c64958385c5a65ae21e42befbd219f9fb..09644ab0d87a7d3dc42a07009bb8bd6772f0edd1 100644 (file)
@@ -756,7 +756,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;
 }