Fix a potentially forever loop.
Found by: PVS-Studio
This commit is contained in:
parent
9f5efe718f
commit
857b699d7e
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=316805
@ -1696,7 +1696,7 @@ ae_stop_txmac(ae_softc_t *sc)
|
||||
/*
|
||||
* Wait for IDLE state.
|
||||
*/
|
||||
for (i = 0; i < AE_IDLE_TIMEOUT; i--) {
|
||||
for (i = 0; i < AE_IDLE_TIMEOUT; i++) {
|
||||
val = AE_READ_4(sc, AE_IDLE_REG);
|
||||
if ((val & (AE_IDLE_TXMAC | AE_IDLE_DMAREAD)) == 0)
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user