summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
authorMartin Pieuchot <mpi@cvs.openbsd.org>2014-04-26 14:26:49 +0000
committerMartin Pieuchot <mpi@cvs.openbsd.org>2014-04-26 14:26:49 +0000
commitff08f14839fecda7ea1c073ab86248564a7073ae (patch)
treee29409c7c4fc3a2f1f5d8e1c4a2534ee76620205 /sys/arch
parentfbd1769ec63877e1a396ec9b153c43cb7ce155f9 (diff)
Do not pass a NULL argument to OF_getprop(), even if it's fine for the
moment since we use an intermediate buffer and we specify a length of 0, there's no need for an exception here. Noticied while playing with the virtual-mode client interface of firmware.
Diffstat (limited to 'sys/arch')
-rw-r--r--sys/arch/macppc/pci/pci_machdep.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/arch/macppc/pci/pci_machdep.c b/sys/arch/macppc/pci/pci_machdep.c
index 00634c334e8..11d4f5d9dd7 100644
--- a/sys/arch/macppc/pci/pci_machdep.c
+++ b/sys/arch/macppc/pci/pci_machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pci_machdep.c,v 1.2 2013/10/13 16:36:46 mpi Exp $ */
+/* $OpenBSD: pci_machdep.c,v 1.3 2014/04/26 14:26:48 mpi Exp $ */
/*
* Copyright (c) 2013 Martin Pieuchot
@@ -326,11 +326,13 @@ ofw_intr_map(int node, uint32_t *addr, uint32_t *intr)
parent = *mp1;
if (bcmp(mp, addr, mlen) == 0) {
+ char ic[20];
+
/*
* If we have a match and the parent is not an
* interrupt controller continue recursively.
*/
- if (OF_getprop(parent, "interrupt-controller", NULL, 0))
+ if (OF_getprop(parent, "interrupt-controller", ic, 20))
return ofw_intr_map(parent, &mp1[1], intr);
*intr = mp1[1];