net: variables reach -1, but 0 tested
while (timeout--) { ... } timeout becomes -1 if the loop isn't ended otherwise, not 0. Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
0047e5d240
commit
46578a6913
@@ -1237,7 +1237,7 @@ static void tsi108_init_phy(struct net_device *dev)
|
||||
spin_lock_irqsave(&phy_lock, flags);
|
||||
|
||||
tsi108_write_mii(data, MII_BMCR, BMCR_RESET);
|
||||
while (i--){
|
||||
while (--i) {
|
||||
if(!(tsi108_read_mii(data, MII_BMCR) & BMCR_RESET))
|
||||
break;
|
||||
udelay(10);
|
||||
|
Reference in New Issue
Block a user