net: more timeouts that reach -1
with while (timeout-- > 0); timeout reaches -1 after the loop, so the tests below are off by one. also don't do an '< 0' test on an unsigned. Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
4222474519
commit
858b9ced6e
@ -560,7 +560,7 @@ ks8695_reset(struct ks8695_priv *ksp)
|
||||
msleep(1);
|
||||
}
|
||||
|
||||
if (reset_timeout == 0) {
|
||||
if (reset_timeout < 0) {
|
||||
dev_crit(ksp->dev,
|
||||
"Timeout waiting for DMA engines to reset\n");
|
||||
/* And blithely carry on */
|
||||
|
Reference in New Issue
Block a user