diff options
author | roel kluin <roel.kluin@gmail.com> | 2009-12-26 23:10:59 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-01-04 00:42:52 -0500 |
commit | d2a928e4bfc75170af641f073475fc974cf176c2 (patch) | |
tree | aecef34e4acc840abcfefa6656640f7cc3781aa7 /drivers/net/niu.c | |
parent | e145b98484f5c7444151e90cc0853f14e6d396a4 (diff) |
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>
Diffstat (limited to 'drivers/net/niu.c')
-rw-r--r-- | drivers/net/niu.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/niu.c b/drivers/net/niu.c index 8ce58c4c7dd3..2aed2b382c40 100644 --- a/drivers/net/niu.c +++ b/drivers/net/niu.c | |||
@@ -2844,7 +2844,7 @@ static int tcam_wait_bit(struct niu *np, u64 bit) | |||
2844 | break; | 2844 | break; |
2845 | udelay(1); | 2845 | udelay(1); |
2846 | } | 2846 | } |
2847 | if (limit < 0) | 2847 | if (limit <= 0) |
2848 | return -ENODEV; | 2848 | return -ENODEV; |
2849 | 2849 | ||
2850 | return 0; | 2850 | return 0; |