[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <201002022243.o12MhiOo019211@imap1.linux-foundation.org>
Date:	Tue, 02 Feb 2010 14:43:44 -0800
From:	akpm@...ux-foundation.org
To:	isdn@...ux-pingi.de
Cc:	netdev@...r.kernel.org, akpm@...ux-foundation.org,
	roel.kluin@...il.com
Subject: [patch 1/4] hisax: timeout off by one in waitrecmsg()
From: Roel Kluin <roel.kluin@...il.com>
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@...il.com>
Cc: Karsten Keil <isdn@...ux-pingi.de>
Signed-off-by: Andrew Morton <akpm@...ux-foundation.org>
---
 drivers/isdn/hisax/isar.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff -puN drivers/isdn/hisax/isar.c~hisax-timeout-off-by-one-in-waitrecmsg drivers/isdn/hisax/isar.c
--- a/drivers/isdn/hisax/isar.c~hisax-timeout-off-by-one-in-waitrecmsg
+++ a/drivers/isdn/hisax/isar.c
@@ -138,7 +138,7 @@ waitrecmsg(struct IsdnCardState *cs, u_c
 	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);
 	}
_
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists
 
