diff options
author | Jordan Hargrave <jordan@cvs.openbsd.org> | 2009-02-10 02:13:20 +0000 |
---|---|---|
committer | Jordan Hargrave <jordan@cvs.openbsd.org> | 2009-02-10 02:13:20 +0000 |
commit | d5b4232d19137a24cc746d3c77808408444195c5 (patch) | |
tree | 9b7a2371ad453bd541cd30794ea8ea6bd76875b3 /sys/dev/acpi | |
parent | 4a1f5772a51ff8bc7ca38d996085ccc8b9b065b0 (diff) |
Fix null pointer for shutdown if acpi not enabled
ok marco@
Diffstat (limited to 'sys/dev/acpi')
-rw-r--r-- | sys/dev/acpi/acpi.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/acpi/acpi.c b/sys/dev/acpi/acpi.c index fdd97389a7a..42aab210cab 100644 --- a/sys/dev/acpi/acpi.c +++ b/sys/dev/acpi/acpi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: acpi.c,v 1.128 2009/02/04 20:09:03 kettenis Exp $ */ +/* $OpenBSD: acpi.c,v 1.129 2009/02/10 02:13:19 jordan Exp $ */ /* * Copyright (c) 2005 Thorsten Lockert <tholo@sigmasoft.com> * Copyright (c) 2005 Jordan Hargrave <jordan@openbsd.org> @@ -1658,7 +1658,7 @@ acpi_enter_sleep_state(struct acpi_softc *sc, int state) u_int16_t rega, regb; int retries; - if (state == ACPI_STATE_S0) + if (sc == NULL || state == ACPI_STATE_S0) return; if (sc->sc_sleeptype[state].slp_typa == -1 || sc->sc_sleeptype[state].slp_typb == -1) { |