Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 17 Feb 2016 21:24:26 +0000 (UTC)
From:      Gleb Smirnoff <glebius@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r295721 - head/sys/dev/ae
Message-ID:  <201602172124.u1HLOQuQ072730@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: glebius
Date: Wed Feb 17 21:24:26 2016
New Revision: 295721
URL: https://svnweb.freebsd.org/changeset/base/295721

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	Wed Feb 17 21:17:14 2016	(r295720)
+++ head/sys/dev/ae/if_ae.c	Wed Feb 17 21:24:26 2016	(r295721)
@@ -1660,7 +1660,7 @@ ae_stop_rxmac(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_RXMAC | AE_IDLE_DMAWRITE)) == 0)
 			break;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201602172124.u1HLOQuQ072730>