niu: timeout ignored in tcam_wait_bit()
Subsystems (2)
PATCH 1/1 niu: timeout ignored in tcam_wait_bit()
With `while (--limit > 0)' i reaches 0 after the loop, so upon timeout the error was not returned.
Signed-off-by Roel Kluin <[email protected]>
---
drivers/net/niu.c +1 -1
@@ -2844,7 +2844,7 @@ static int tcam_wait_bit(struct niu *np, u64 bit)break ;udelay (1 ); } -if (limit <0 ) +if (limit <=0 )return -ENODEV ;return 0 ;
From: Roel Kluin <[email protected]>
Date: Sun, 27 Dec 2009 15:10:59 +0100
Quoted 4 lines
With `while (--limit > 0)' i reaches 0 after the loop, so upon timeout the error was not returned.
Signed-off-by Roel Kluin <[email protected]>
Applied.