Date: Fri, 14 Apr 2017 02:24:02 +0000 (UTC) From: Pyun YongHyeon <yongari@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r316805 - head/sys/dev/ae Message-ID: <201704140224.v3E2O2R0069083@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: yongari Date: Fri Apr 14 02:24:02 2017 New Revision: 316805 URL: https://svnweb.freebsd.org/changeset/base/316805 Log: Fix a potentially forever loop. Found by: PVS-Studio Modified: head/sys/dev/ae/if_ae.c Modified: head/sys/dev/ae/if_ae.c ============================================================================== --- head/sys/dev/ae/if_ae.c Fri Apr 14 01:56:15 2017 (r316804) +++ head/sys/dev/ae/if_ae.c Fri Apr 14 02:24:02 2017 (r316805) @@ -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;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201704140224.v3E2O2R0069083>