hisax: timeout off by one in waitrecmsg()
Subsystems (2)
PATCH 1/4 hisax: timeout off by one in waitrecmsg()
From: Roel Kluin <[email protected]>
With `while (timeout++ < maxdelay)' timeout reaches maxdelay + 1 after the loop This is probably unlikely a problem in practice.
Signed-off-by Roel Kluin <[email protected]>
Cc Karsten Keil <[email protected]>
Signed-off-by Andrew Morton <[email protected]>
---
drivers/isdn/hisax/isar.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/isdn/hisax/isar.c renamed from drivers/isdn/hisax/isar.c~hisax-timeout-off-by-one-in-waitrecmsg +1 -1
@@ -138,7 +138,7 @@ waitrecmsg(struct IsdnCardState *cs, u_cwhile ((!(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 ); }
_
From: [email protected]
Date: Tue, 02 Feb 2010 14:43:44 -0800
Quoted 8 lines
From: Roel Kluin <[email protected]>
With `while (timeout++ < maxdelay)' timeout reaches maxdelay + 1 after the loop This is probably unlikely a problem in practice.
Signed-off-by Roel Kluin <[email protected]>Cc Karsten Keil <[email protected]>Signed-off-by Andrew Morton <[email protected]>
Applied.