TG3: limit reaches -1
authorRoel Kluin <roel.kluin@gmail.com>
Fri, 13 Feb 2009 00:33:27 +0000 (16:33 -0800)
committerDavid S. Miller <davem@davemloft.net>
Fri, 13 Feb 2009 00:33:27 +0000 (16:33 -0800)
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>
drivers/net/tg3.c

index 8b3f846..4595962 100644 (file)
@@ -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;