Commit d2a928e4 authored by roel kluin's avatar roel kluin Committed by David S. Miller

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: default avatarRoel Kluin <roel.kluin@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent e145b984
...@@ -2844,7 +2844,7 @@ static int tcam_wait_bit(struct niu *np, u64 bit) ...@@ -2844,7 +2844,7 @@ static int tcam_wait_bit(struct niu *np, u64 bit)
break; break;
udelay(1); udelay(1);
} }
if (limit < 0) if (limit <= 0)
return -ENODEV; return -ENODEV;
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