Fix a potentially forever loop.
Found by: PVS-Studio
This commit is contained in:
parent
3bd2cbf9a3
commit
8aa3646a96
@ -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…
x
Reference in New Issue
Block a user