From: Antoine Tenart Date: Tue, 26 May 2020 16:22:54 +0000 (+0200) Subject: net: phy: mscc-miim: remove redundant timeout check X-Git-Tag: v5.10.7~2469^2~103^2~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f5112c8ae22f8d5796b10d9f5db0014b3546dd00;p=platform%2Fkernel%2Flinux-rpi.git net: phy: mscc-miim: remove redundant timeout check readl_poll_timeout already returns -ETIMEDOUT if the condition isn't satisfied, there's no need to check again the condition after calling it. Remove the redundant timeout check. Signed-off-by: Antoine Tenart Reviewed-by: Alexandre Belloni Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller --- diff --git a/drivers/net/phy/mdio-mscc-miim.c b/drivers/net/phy/mdio-mscc-miim.c index 0b7544f..42119f6 100644 --- a/drivers/net/phy/mdio-mscc-miim.c +++ b/drivers/net/phy/mdio-mscc-miim.c @@ -43,12 +43,8 @@ static int mscc_miim_wait_ready(struct mii_bus *bus) struct mscc_miim_dev *miim = bus->priv; u32 val; - readl_poll_timeout(miim->regs + MSCC_MIIM_REG_STATUS, val, - !(val & MSCC_MIIM_STATUS_STAT_BUSY), 50, 10000); - if (val & MSCC_MIIM_STATUS_STAT_BUSY) - return -ETIMEDOUT; - - return 0; + return readl_poll_timeout(miim->regs + MSCC_MIIM_REG_STATUS, val, + !(val & MSCC_MIIM_STATUS_STAT_BUSY), 50, 10000); } static int mscc_miim_read(struct mii_bus *bus, int mii_id, int regnum)