summaryrefslogtreecommitdiffstats
path: root/drivers/net/tsi108_eth.c
diff options
context:
space:
mode:
authorRoel Kluin <roel.kluin@gmail.com>2009-02-02 21:39:02 -0800
committerDavid S. Miller <davem@davemloft.net>2009-02-02 21:39:02 -0800
commit46578a6913e6f5e69229561736b94c18c2e88ae4 (patch)
tree23db22f32e094dd971650528ea1d499bd2ab3015 /drivers/net/tsi108_eth.c
parent0047e5d240ede4e84c03bc9001375175900fd259 (diff)
downloadop-kernel-dev-46578a6913e6f5e69229561736b94c18c2e88ae4.zip
op-kernel-dev-46578a6913e6f5e69229561736b94c18c2e88ae4.tar.gz
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>
Diffstat (limited to 'drivers/net/tsi108_eth.c')
-rw-r--r--drivers/net/tsi108_eth.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/tsi108_eth.c b/drivers/net/tsi108_eth.c
index 75461db..a9fd2b2 100644
--- a/drivers/net/tsi108_eth.c
+++ b/drivers/net/tsi108_eth.c
@@ -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);
OpenPOWER on IntegriCloud