aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/sungem.c
diff options
context:
space:
mode:
authorRoel Kluin <roel.kluin@gmail.com>2009-02-03 00:39:02 -0500
committerDavid S. Miller <davem@davemloft.net>2009-02-03 00:39:02 -0500
commit46578a6913e6f5e69229561736b94c18c2e88ae4 (patch)
tree23db22f32e094dd971650528ea1d499bd2ab3015 /drivers/net/sungem.c
parent0047e5d240ede4e84c03bc9001375175900fd259 (diff)
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/sungem.c')
-rw-r--r--drivers/net/sungem.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/sungem.c b/drivers/net/sungem.c
index 86c765d83de1..b17efa9cc530 100644
--- a/drivers/net/sungem.c
+++ b/drivers/net/sungem.c
@@ -148,7 +148,7 @@ static u16 __phy_read(struct gem *gp, int phy_addr, int reg)
148 cmd |= (MIF_FRAME_TAMSB); 148 cmd |= (MIF_FRAME_TAMSB);
149 writel(cmd, gp->regs + MIF_FRAME); 149 writel(cmd, gp->regs + MIF_FRAME);
150 150
151 while (limit--) { 151 while (--limit) {
152 cmd = readl(gp->regs + MIF_FRAME); 152 cmd = readl(gp->regs + MIF_FRAME);
153 if (cmd & MIF_FRAME_TALSB) 153 if (cmd & MIF_FRAME_TALSB)
154 break; 154 break;