提交 d4675b52 编写于 作者: R Roel Kluin 提交者: David S. Miller

TG3: limit reaches -1

With while (limit--) { ... } limit reaches -1, so 0 means success.
Signed-off-by: NRoel Kluin <roel.kluin@gmail.com>
Acked-by: NMichael Chan <mchan@broadcom.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 89c581b3
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册