Commit e23e1179 authored by Roel Kluin's avatar Roel Kluin Committed by David S. Miller

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.
Signed-off-by: default avatarRoel Kluin <roel.kluin@gmail.com>
Cc: Karsten Keil <isdn@linux-pingi.de>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 4bbd1a19
...@@ -138,7 +138,7 @@ waitrecmsg(struct IsdnCardState *cs, u_char *len, ...@@ -138,7 +138,7 @@ waitrecmsg(struct IsdnCardState *cs, u_char *len,
while((!(cs->BC_Read_Reg(cs, 0, ISAR_IRQBIT) & ISAR_IRQSTA)) && while((!(cs->BC_Read_Reg(cs, 0, ISAR_IRQBIT) & ISAR_IRQSTA)) &&
(timeout++ < maxdelay)) (timeout++ < maxdelay))
udelay(1); udelay(1);
if (timeout >= maxdelay) { if (timeout > maxdelay) {
printk(KERN_WARNING"isar recmsg IRQSTA timeout\n"); printk(KERN_WARNING"isar recmsg IRQSTA timeout\n");
return(0); return(0);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment