svn commit: r303551 - head/sys/dev/ntb

Alexander Motin mav at FreeBSD.org
Sat Jul 30 10:32:30 UTC 2016


Author: mav
Date: Sat Jul 30 10:32:28 2016
New Revision: 303551
URL: https://svnweb.freebsd.org/changeset/base/303551

Log:
  Fix infinite loops introduced at r303429.

Modified:
  head/sys/dev/ntb/ntb.c

Modified: head/sys/dev/ntb/ntb.c
==============================================================================
--- head/sys/dev/ntb/ntb.c	Sat Jul 30 09:46:29 2016	(r303550)
+++ head/sys/dev/ntb/ntb.c	Sat Jul 30 10:32:28 2016	(r303551)
@@ -206,7 +206,7 @@ ntb_link_enable(device_t ntb, enum ntb_s
 	struct ntb_child **cpp = device_get_softc(device_get_parent(nc->dev));
 	struct ntb_child *nc1;
 
-	for (nc1 = *cpp; nc1 != NULL; nc1 = nc->next) {
+	for (nc1 = *cpp; nc1 != NULL; nc1 = nc1->next) {
 		if (nc1->enabled) {
 			nc->enabled = 1;
 			return (0);
@@ -226,7 +226,7 @@ ntb_link_disable(device_t ntb)
 	if (!nc->enabled)
 		return (0);
 	nc->enabled = 0;
-	for (nc1 = *cpp; nc1 != NULL; nc1 = nc->next) {
+	for (nc1 = *cpp; nc1 != NULL; nc1 = nc1->next) {
 		if (nc1->enabled)
 			return (0);
 	}


More information about the svn-src-all mailing list