mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-28 14:44:10 +08:00
TG3: limit reaches -1
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>
This commit is contained in:
parent
89c581b3fb
commit
d4675b52a9
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user