All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] hisax: timeout off by one in waitrecmsg()
@ 2009-12-27 21:16 Roel Kluin
  0 siblings, 0 replies; only message in thread
From: Roel Kluin @ 2009-12-27 21:16 UTC (permalink / raw)
  To: Karsten Keil, isdn4linux, Andrew Morton, LKML

With `while (timeout++ < maxdelay)' timeout reaches maxdelay + 1 after the loop
This is probably unlikely a problem in practice.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
---
 drivers/isdn/hisax/isar.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/isdn/hisax/isar.c b/drivers/isdn/hisax/isar.c
index bfeb9b6..6bde16c 100644
--- a/drivers/isdn/hisax/isar.c
+++ b/drivers/isdn/hisax/isar.c
@@ -138,7 +138,7 @@ waitrecmsg(struct IsdnCardState *cs, u_char *len,
 	while((!(cs->BC_Read_Reg(cs, 0, ISAR_IRQBIT) & ISAR_IRQSTA)) &&
 		(timeout++ < maxdelay))
 		udelay(1);
-	if (timeout >= maxdelay) {
+	if (timeout > maxdelay) {
 		printk(KERN_WARNING"isar recmsg IRQSTA timeout\n");
 		return(0);
 	}

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2009-12-27 21:14 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-27 21:16 [PATCH] hisax: timeout off by one in waitrecmsg() Roel Kluin

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.