Message ID | 201002022243.o12MhiOo019211@imap1.linux-foundation.org |
---|---|
State | Accepted, archived |
Delegated to: | David Miller |
Headers | show |
From: akpm@linux-foundation.org Date: Tue, 02 Feb 2010 14:43:44 -0800 > From: Roel Kluin <roel.kluin@gmail.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@gmail.com> > Cc: Karsten Keil <isdn@linux-pingi.de> > Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Applied. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
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); }