Skip to contentSkip to conversation

hisax: timeout off by one in waitrecmsg()

PATCH New Roel Kluin 1 participant 1 message Dec 27, 2009

lore
Share & tools
lore

Roel Kluin

author
#0 lore raw

PATCH 1/1 hisax: timeout off by one in waitrecmsg()

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

---
 drivers/isdn/hisax/isar.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/isdn/hisax/isar.c +1 -1
index bfeb9b6..6bde16c 100644
@@ -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);
 	}