summaryrefslogtreecommitdiffstats
path: root/drivers/net/ibm_newemac
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/ibm_newemac
parent0047e5d240ede4e84c03bc9001375175900fd259 (diff)
downloadlinux-stable-46578a6913e6f5e69229561736b94c18c2e88ae4.tar.gz
linux-stable-46578a6913e6f5e69229561736b94c18c2e88ae4.tar.bz2
linux-stable-46578a6913e6f5e69229561736b94c18c2e88ae4.zip
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/ibm_newemac')
-rw-r--r--drivers/net/ibm_newemac/phy.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/ibm_newemac/phy.c b/drivers/net/ibm_newemac/phy.c
index c40cd8df2212..ac9d964e59ec 100644
--- a/drivers/net/ibm_newemac/phy.c
+++ b/drivers/net/ibm_newemac/phy.c
@@ -60,7 +60,7 @@ int emac_mii_reset_phy(struct mii_phy *phy)
udelay(300);
- while (limit--) {
+ while (--limit) {
val = phy_read(phy, MII_BMCR);
if (val >= 0 && (val & BMCR_RESET) == 0)
break;
@@ -84,7 +84,7 @@ int emac_mii_reset_gpcs(struct mii_phy *phy)
udelay(300);
- while (limit--) {
+ while (--limit) {
val = gpcs_phy_read(phy, MII_BMCR);
if (val >= 0 && (val & BMCR_RESET) == 0)
break;