Return errno value rather than boolean in this context.
MFC after: 1 week
This commit is contained in:
parent
b134ea7211
commit
7572a9c749
@ -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. */
|
||||
|
Loading…
Reference in New Issue
Block a user