summaryrefslogtreecommitdiffstats
path: root/sys/dev/acpi/acpiprt.c
diff options
context:
space:
mode:
authormarco <marco@openbsd.org>2006-11-27 16:32:43 +0000
committermarco <marco@openbsd.org>2006-11-27 16:32:43 +0000
commit47a6fcc99ce3096826d30ecd544d08e8b368d1cc (patch)
tree823792282a22d343ad0307058fdf2ed11afdb6ba /sys/dev/acpi/acpiprt.c
parentOnly use the ichpcib speedstep feature if we're running on a (Mobile) Pentium 4, (diff)
downloadwireguard-openbsd-47a6fcc99ce3096826d30ecd544d08e8b368d1cc.tar.xz
wireguard-openbsd-47a6fcc99ce3096826d30ecd544d08e8b368d1cc.zip
Add check for acpi pointer. This prevents some ugly panics.
ok ketennis.
Diffstat (limited to 'sys/dev/acpi/acpiprt.c')
-rw-r--r--sys/dev/acpi/acpiprt.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/dev/acpi/acpiprt.c b/sys/dev/acpi/acpiprt.c
index 5d06c7c8d9f..d8e7653b5fc 100644
--- a/sys/dev/acpi/acpiprt.c
+++ b/sys/dev/acpi/acpiprt.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: acpiprt.c,v 1.4 2006/11/27 15:20:26 jordan Exp $ */
+/* $OpenBSD: acpiprt.c,v 1.5 2006/11/27 16:32:43 marco Exp $ */
/*
* Copyright (c) 2006 Mark Kettenis <kettenis@openbsd.org>
*
@@ -182,6 +182,10 @@ acpiprt_prt_add(struct acpiprt_softc *sc, struct aml_value *v)
irq = aml_val2int(v->v_package[3]);
}
apic = ioapic_find_bybase(irq);
+ if (apic == NULL) {
+ printf("%s: no apic found for irq %d\n", DEVNAME(sc), irq);
+ return;
+ }
map = malloc(sizeof (struct mp_intr_map), M_DEVBUF, M_NOWAIT);
if (map == NULL)