Skip to content

Commit

Permalink
ACPI: sleep: Put the FACS table after using it
Browse files Browse the repository at this point in the history
Put the FACS table after using it to release the table
mapping.

Signed-off-by: Hanjun Guo <guohanjun@huawei.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
  • Loading branch information
Hanjun Guo authored and Rafael J. Wysocki committed May 9, 2020
1 parent ead7ba1 commit 9572223
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/acpi/sleep.c
Original file line number Diff line number Diff line change
Expand Up @@ -1297,8 +1297,10 @@ static void acpi_sleep_hibernate_setup(void)
return;

acpi_get_table(ACPI_SIG_FACS, 1, (struct acpi_table_header **)&facs);
if (facs)
if (facs) {
s4_hardware_signature = facs->hardware_signature;
acpi_put_table((struct acpi_table_header *)facs);
}
}
#else /* !CONFIG_HIBERNATION */
static inline void acpi_sleep_hibernate_setup(void) {}
Expand Down

0 comments on commit 9572223

Please sign in to comment.