Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

net: phy: mdio-bcm-unimac: remove redundant !timeout check

The check for zero timeout is always true at the end of the proceeding
while loop; the only other exit path in the loop is if the unimac MDIO
is not busy. Remove the redundant zero timeout check and always
return -ETIMEDOUT on this timeout return path.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Colin Ian King and committed by
David S. Miller
180a8c3d 4f661542

+1 -4
+1 -4
drivers/net/phy/mdio-bcm-unimac.c
··· 92 92 usleep_range(1000, 2000); 93 93 } while (--timeout); 94 94 95 - if (!timeout) 96 - return -ETIMEDOUT; 97 - 98 - return 0; 95 + return -ETIMEDOUT; 99 96 } 100 97 101 98 static int unimac_mdio_read(struct mii_bus *bus, int phy_id, int reg)