]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
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 8b3f8468538794ff08c66b616a7bcdd848a127e2..4595962fb8e1b0f74385fc25cc6d28d57846f878 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;