Fix an infinite loop when a node doesn't have an interrupt-parent property.

Submitted by:	Aleksey Kuleshov <rndfax@yandex.ru>
Differential Revision: https://reviews.freebsd.org/D3041
This commit is contained in:
Andrew Turner 2015-07-15 13:28:25 +00:00
parent 7dbe8f175b
commit 63e8633e80

View File

@ -445,7 +445,7 @@ 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;
}