diff options
author | Mark Kettenis <kettenis@cvs.openbsd.org> | 2007-04-10 14:26:18 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@cvs.openbsd.org> | 2007-04-10 14:26:18 +0000 |
commit | 1751a878b7ee7a4e7940004164313202e10a517c (patch) | |
tree | b73e5e62461483af7687cc1b448c9e94549be3cb /sys | |
parent | a2ff738e45af993b77666e47106bb8c5689b8e28 (diff) |
Prevent infinite loop mapping interrupts when "reg" property is missing.
ok mbalmer@, dlg@
Diffstat (limited to 'sys')
-rw-r--r-- | sys/arch/sparc64/sparc64/ofw_machdep.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/sys/arch/sparc64/sparc64/ofw_machdep.c b/sys/arch/sparc64/sparc64/ofw_machdep.c index 76b6ea40dc2..906a7927dde 100644 --- a/sys/arch/sparc64/sparc64/ofw_machdep.c +++ b/sys/arch/sparc64/sparc64/ofw_machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ofw_machdep.c,v 1.17 2007/04/06 22:38:14 kettenis Exp $ */ +/* $OpenBSD: ofw_machdep.c,v 1.18 2007/04/10 14:26:17 kettenis Exp $ */ /* $NetBSD: ofw_machdep.c,v 1.16 2001/07/20 00:07:14 eeh Exp $ */ /* @@ -866,11 +866,10 @@ OF_mapintr(int node, int *interrupt, int validlen, int buflen) } /* Get reg for the next level search. */ - if ((len = OF_getprop(node, "reg", ®, sizeof(reg))) <= 0) { + if ((len = OF_getprop(node, "reg", ®, sizeof(reg))) <= 0) DPRINTF(("OF_mapintr: no reg property?\n")); - continue; - } - DPRINTF(("reg len %d\n", len)); + else + DPRINTF(("reg len %d\n", len)); node = OF_parent(node); } |