mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-16 08:44:21 +08:00
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 <roel.kluin@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
e145b98484
commit
d2a928e4bf
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user