diff options
author | Roel Kluin <roel.kluin@gmail.com> | 2009-02-12 16:33:27 -0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-02-12 16:33:27 -0800 |
commit | d4675b52a933831d4901217564cba5a434ddd922 (patch) | |
tree | d53da2dac6306cf7e3bc41eef708265eefe0d683 | |
parent | 89c581b3fb2986e303f1299e6458e3e9b115fa3f (diff) | |
download | linux-3.10-d4675b52a933831d4901217564cba5a434ddd922.tar.gz linux-3.10-d4675b52a933831d4901217564cba5a434ddd922.tar.bz2 linux-3.10-d4675b52a933831d4901217564cba5a434ddd922.zip |
TG3: limit reaches -1
With while (limit--) { ... } limit reaches -1, so 0 means success.
Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Acked-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/net/tg3.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c index 8b3f8468538..4595962fb8e 100644 --- a/drivers/net/tg3.c +++ b/drivers/net/tg3.c @@ -852,7 +852,7 @@ static int tg3_bmcr_reset(struct tg3 *tp) } udelay(10); } - if (limit <= 0) + if (limit < 0) return -EBUSY; return 0; @@ -1603,7 +1603,7 @@ static int tg3_wait_macro_done(struct tg3 *tp) break; } } - if (limit <= 0) + if (limit < 0) return -EBUSY; return 0; |