net: variables reach -1, but 0 tested
while (timeout--) { ... } timeout becomes -1 if the loop isn't ended otherwise, not 0. Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
0047e5d240
commit
46578a6913
7 changed files with 14 additions and 14 deletions
|
@ -148,7 +148,7 @@ static u16 __phy_read(struct gem *gp, int phy_addr, int reg)
|
|||
cmd |= (MIF_FRAME_TAMSB);
|
||||
writel(cmd, gp->regs + MIF_FRAME);
|
||||
|
||||
while (limit--) {
|
||||
while (--limit) {
|
||||
cmd = readl(gp->regs + MIF_FRAME);
|
||||
if (cmd & MIF_FRAME_TALSB)
|
||||
break;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue