netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] niu: timeout ignored in tcam_wait_bit()
@ 2009-12-27 14:10 Roel Kluin
  2010-01-04  5:43 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Roel Kluin @ 2009-12-27 14:10 UTC (permalink / raw)
  To: netdev, Andrew Morton, LKML

With `while (--limit > 0)' i reaches 0 after the loop, so upon timeout the
error was not returned.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
---
diff --git a/drivers/net/niu.c b/drivers/net/niu.c
index 8ce58c4..2aed2b3 100644
--- a/drivers/net/niu.c
+++ b/drivers/net/niu.c
@@ -2844,7 +2844,7 @@ static int tcam_wait_bit(struct niu *np, u64 bit)
 			break;
 		udelay(1);
 	}
-	if (limit < 0)
+	if (limit <= 0)
 		return -ENODEV;
 
 	return 0;

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

end of thread, other threads:[~2010-01-04  5:43 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-27 14:10 [PATCH] niu: timeout ignored in tcam_wait_bit() Roel Kluin
2010-01-04  5:43 ` David Miller

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).