summaryrefslogtreecommitdiffstats
path: root/sys/dev/acpica
diff options
context:
space:
mode:
authoriwasaki <iwasaki@FreeBSD.org>2008-01-28 01:57:48 +0000
committeriwasaki <iwasaki@FreeBSD.org>2008-01-28 01:57:48 +0000
commit956e8b1018e703b0092adfa565b14ca20b8c13cb (patch)
tree28af432def0bc0291cdc62ff50dd327444f26113 /sys/dev/acpica
parentb2c068251b6066a7f5d1e4126014a929ac3de73d (diff)
downloadFreeBSD-src-956e8b1018e703b0092adfa565b14ca20b8c13cb.zip
FreeBSD-src-956e8b1018e703b0092adfa565b14ca20b8c13cb.tar.gz
Return errno value rather than boolean in this context.
MFC after: 1 week
Diffstat (limited to 'sys/dev/acpica')
-rw-r--r--sys/dev/acpica/acpi.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/sys/dev/acpica/acpi.c b/sys/dev/acpica/acpi.c
index 4bd564a..dba4edd 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. */
OpenPOWER on IntegriCloud