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 <antoine.tenart@bootlin.com>
Reviewed-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Antoine Tenart 2020-05-26 18:22:54 +02:00 committed by David S. Miller
parent 9513167e6c
commit f5112c8ae2
1 changed files with 2 additions and 6 deletions

View File

@ -43,12 +43,8 @@ static int mscc_miim_wait_ready(struct mii_bus *bus)
struct mscc_miim_dev *miim = bus->priv; struct mscc_miim_dev *miim = bus->priv;
u32 val; u32 val;
readl_poll_timeout(miim->regs + MSCC_MIIM_REG_STATUS, val, return readl_poll_timeout(miim->regs + MSCC_MIIM_REG_STATUS, val,
!(val & MSCC_MIIM_STATUS_STAT_BUSY), 50, 10000); !(val & MSCC_MIIM_STATUS_STAT_BUSY), 50, 10000);
if (val & MSCC_MIIM_STATUS_STAT_BUSY)
return -ETIMEDOUT;
return 0;
} }
static int mscc_miim_read(struct mii_bus *bus, int mii_id, int regnum) static int mscc_miim_read(struct mii_bus *bus, int mii_id, int regnum)