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:
Roel Kluin
2009-02-02 21:39:02 -08:00
committed by David S. Miller
parent 0047e5d240
commit 46578a6913
7 changed files with 14 additions and 14 deletions

View File

@@ -227,7 +227,7 @@ static int qe_init(struct sunqe *qep, int from_irq)
if (!(sbus_readb(mregs + MREGS_PHYCONFIG) & MREGS_PHYCONFIG_LTESTDIS)) {
int tries = 50;
while (tries--) {
while (--tries) {
u8 tmp;
mdelay(5);