Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d2a928e4 authored by roel kluin's avatar roel kluin Committed by David S. Miller
Browse files

niu: timeout ignored in tcam_wait_bit()



With `while (--limit > 0)' i reaches 0 after the loop, so upon timeout the
error was not returned.

Signed-off-by: default avatarRoel Kluin <roel.kluin@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent e145b984
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -2844,7 +2844,7 @@ static int tcam_wait_bit(struct niu *np, u64 bit)
			break;
		udelay(1);
	}
	if (limit < 0)
	if (limit <= 0)
		return -ENODEV;

	return 0;