From 7572a9c749459a76ed04127dcc5f58a4b285cab2 Mon Sep 17 00:00:00 2001 From: Mitsuru IWASAKI Date: Mon, 28 Jan 2008 01:57:48 +0000 Subject: [PATCH] Return errno value rather than boolean in this context. MFC after: 1 week --- sys/dev/acpica/acpi.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/sys/dev/acpica/acpi.c b/sys/dev/acpica/acpi.c index 4bd564accced..dba4edd3f936 100644 --- a/sys/dev/acpica/acpi.c +++ b/sys/dev/acpica/acpi.c @@ -2197,8 +2197,12 @@ acpi_ReqSleepState(struct acpi_softc *sc, int state) /* If devd(8) is not running, immediately enter the sleep state. */ if (devctl_process_running() == FALSE) { - ACPI_UNLOCK(acpi); - return (ACPI_FAILURE(acpi_EnterSleepState(sc, sc->acpi_next_sstate))); + ACPI_UNLOCK(acpi); + if (ACPI_SUCCESS(acpi_EnterSleepState(sc, sc->acpi_next_sstate))) { + return (0); + } else { + return (ENXIO); + } } /* Now notify devd(8) also. */