[PATCH] ofw: fix infinite loop

From: Aleksey Kuleshov <rndfax_at_yandex.ru>
Date: Wed, 8 Jul 2015 22:14:03 +0000
Fix obvious typo in ofw bus when there is no interrupt-parent for the node.

---
 sys/dev/ofw/ofw_bus_subr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys/dev/ofw/ofw_bus_subr.c b/sys/dev/ofw/ofw_bus_subr.c
index 233675d..c7a50db 100644
--- a/sys/dev/ofw/ofw_bus_subr.c
+++ b/sys/dev/ofw/ofw_bus_subr.c
_at__at_ -444,7 +444,7 _at__at_ ofw_bus_intr_to_rl(device_t dev, phandle_t node,
 		if (OF_searchencprop(node, "interrupt-parent", &iparent,
 		    sizeof(iparent)) == -1) {
 			for (iparent = node; iparent != 0;
-			    iparent = OF_parent(node)) {
+			    iparent = OF_parent(iparent)) {
 				if (OF_hasprop(iparent, "interrupt-controller"))
 					break;
 			}
-- 
2.4.5
Received on Wed Jul 08 2015 - 17:21:42 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:58 UTC