From: Roel Kluin Date: Fri, 13 Feb 2009 00:33:27 +0000 (-0800) Subject: TG3: limit reaches -1 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=d4675b52a933831d4901217564cba5a434ddd922;p=linux-2.6-omap-h63xx.git TG3: limit reaches -1 With while (limit--) { ... } limit reaches -1, so 0 means success. Signed-off-by: Roel Kluin Acked-by: Michael Chan Signed-off-by: David S. Miller --- 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;