1
0
Fork 0

ACPI / Sleep: Free NVS copy if suspending of devices fails

If suspending of devices fails or system suspend is tested in the
"devices" mode, the memory allocated for storing a copy of the ACPI
NVS area will not be freed, because acpi_pm_finish() is not called
in that case.  Fix this by moving the suspend_nvs_free() call to
acpi_pm_end().

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Len Brown <len.brown@intel.com>
hifive-unleashed-5.1
Rafael J. Wysocki 2010-07-06 18:28:35 -04:00 committed by Len Brown
parent 815c4163b6
commit e96c4b081d
1 changed files with 1 additions and 1 deletions

View File

@ -145,7 +145,6 @@ static void acpi_pm_finish(void)
{
u32 acpi_state = acpi_target_sleep_state;
suspend_nvs_free();
acpi_ec_unblock_transactions();
if (acpi_state == ACPI_STATE_S0)
@ -167,6 +166,7 @@ static void acpi_pm_finish(void)
*/
static void acpi_pm_end(void)
{
suspend_nvs_free();
/*
* This is necessary in case acpi_pm_finish() is not called during a
* failing transition to a sleep state.