netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] cassini: i reaches 0, not -1.
@ 2009-02-09 22:12 Roel Kluin
  2009-02-10  1:56 ` David Miller
  0 siblings, 1 reply; 3+ messages in thread
From: Roel Kluin @ 2009-02-09 22:12 UTC (permalink / raw)
  To: David S. Miller, netdev; +Cc: lkml

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

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
---
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);


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-02-10  9:18 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-02-09 22:12 [PATCH] cassini: i reaches 0, not -1 Roel Kluin
2009-02-10  1:56 ` David Miller
2009-02-10  9:18   ` Roel Kluin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).