diff options
author | Gordon Willem Klok <gwk@cvs.openbsd.org> | 2007-06-15 22:37:41 +0000 |
---|---|---|
committer | Gordon Willem Klok <gwk@cvs.openbsd.org> | 2007-06-15 22:37:41 +0000 |
commit | 2bb7e475eeae9ab019b66427855c2a46d9437d27 (patch) | |
tree | ce4fa6d6bc6024477070022a335238225572014a /sys/dev/acpi/acpicpu.c | |
parent | 79a78e3eafbb54734b0c6e88004e5dc9c06dd400 (diff) |
Check that sc_notify actually points to something before attempting to call
it. Fixes marco@'s post c2k7 panics.
ok marco
Diffstat (limited to 'sys/dev/acpi/acpicpu.c')
-rw-r--r-- | sys/dev/acpi/acpicpu.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/dev/acpi/acpicpu.c b/sys/dev/acpi/acpicpu.c index 8a171529a84..151f1acd775 100644 --- a/sys/dev/acpi/acpicpu.c +++ b/sys/dev/acpi/acpicpu.c @@ -1,4 +1,4 @@ -/* $OpenBSD: acpicpu.c,v 1.25 2007/05/31 17:49:16 gwk Exp $ */ +/* $OpenBSD: acpicpu.c,v 1.26 2007/06/15 22:37:40 gwk Exp $ */ /* * Copyright (c) 2005 Marco Peereboom <marco@openbsd.org> * @@ -510,7 +510,8 @@ acpicpu_notify(struct aml_node *node, int notify_type, void *arg) case 0x80: /* _PPC changed, retrieve new values */ acpicpu_getpct(sc); acpicpu_getpss(sc); - sc->sc_notify(sc->sc_pss, sc->sc_pss_len); + if (sc->sc_notify) + sc->sc_notify(sc->sc_pss, sc->sc_pss_len); break; default: printf("%s: unhandled cpu event %x\n", DEVNAME(sc), |