hisax: timeout off by one in waitrecmsg()
authorRoel Kluin <roel.kluin@gmail.com>
Tue, 2 Feb 2010 12:43:44 +0000 (12:43 +0000)
committerDavid S. Miller <davem@davemloft.net>
Thu, 4 Feb 2010 04:16:46 +0000 (20:16 -0800)
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>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/isdn/hisax/isar.c

index bfeb9b6aa04370e118f9eee04d0d29a454fb03d3..6bde16c00fb53c8e0959f1d3a05a294f77da5cfa 100644 (file)
@@ -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);
        }