[PATCH] cassini: i reaches 0, not -1.

From: Roel Kluin
Date: Mon Feb 09 2009 - 17:12:22 EST


With while (i-- > 0) { ... } i reaches 0, not -1.

Signed-off-by: Roel Kluin <roel.kluin@xxxxxxxxx>
---
diff --git a/drivers/net/cassini.c b/drivers/net/cassini.c
index bbbc3bb..2de2cdf 100644
--- a/drivers/net/cassini.c
+++ b/drivers/net/cassini.c
@@ -3568,7 +3568,7 @@ static inline void cas_start_dma(struct cas *cp)
break;
udelay(10);
}
- if (i < 0) txfailed = 1;
+ if (i <= 0) txfailed = 1;
i = STOP_TRIES;
while (i-- > 0) {
val = readl(cp->regs + REG_MAC_RX_CFG);

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/