From 857b699d7ece35f1b8d6bb7adc197fa9dec4796a Mon Sep 17 00:00:00 2001 From: Pyun YongHyeon Date: Fri, 14 Apr 2017 02:24:02 +0000 Subject: Fix a potentially forever loop. Found by: PVS-Studio --- sys/dev/ae/if_ae.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/ae/if_ae.c b/sys/dev/ae/if_ae.c index 23ed1d89d3ef..0734335ca774 100644 --- a/sys/dev/ae/if_ae.c +++ b/sys/dev/ae/if_ae.c @@ -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; -- cgit v1.2.3