Commit d4675b52 authored by Roel Kluin's avatar Roel Kluin Committed by David S. Miller

TG3: limit reaches -1

With while (limit--) { ... } limit reaches -1, so 0 means success.
Signed-off-by: default avatarRoel Kluin <roel.kluin@gmail.com>
Acked-by: default avatarMichael Chan <mchan@broadcom.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 89c581b3
...@@ -852,7 +852,7 @@ static int tg3_bmcr_reset(struct tg3 *tp) ...@@ -852,7 +852,7 @@ static int tg3_bmcr_reset(struct tg3 *tp)
} }
udelay(10); udelay(10);
} }
if (limit <= 0) if (limit < 0)
return -EBUSY; return -EBUSY;
return 0; return 0;
...@@ -1603,7 +1603,7 @@ static int tg3_wait_macro_done(struct tg3 *tp) ...@@ -1603,7 +1603,7 @@ static int tg3_wait_macro_done(struct tg3 *tp)
break; break;
} }
} }
if (limit <= 0) if (limit < 0)
return -EBUSY; return -EBUSY;
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