Commit f5112c8a authored by Antoine Tenart's avatar Antoine Tenart Committed by David S. Miller
Browse files

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: default avatarAntoine Tenart <antoine.tenart@bootlin.com>
Reviewed-by: default avatarAlexandre Belloni <alexandre.belloni@bootlin.com>
Reviewed-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 9513167e
Loading
Loading
Loading
Loading
+2 −6
Original line number Diff line number Diff line
@@ -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,
	return 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;
}

static int mscc_miim_read(struct mii_bus *bus, int mii_id, int regnum)