Skip to content

Commit 8f334e3

Browse files
committed
ACPI: PM: s2idle: Add missing checks to acpi_s2idle_begin_lps0()
Commit 32ece31 ("ACPI: PM: s2idle: Only retrieve constraints when needed"), that attempted to avoid useless evaluation of LPS0 _DSM Function 1 in lps0_device_attach(), forgot to add checks for lps0_device_handle and sleep_no_lps0 to acpi_s2idle_begin_lps0() where they should be done before calling lpi_device_get_constraints() or lpi_device_get_constraints_amd(). Add the missing checks. Fixes: 32ece31 ("ACPI: PM: s2idle: Only retrieve constraints when needed") Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Reviewed-by: Mario Limonciello (AMD) <superm1@kernel.org> Link: https://patch.msgid.link/2818730.mvXUDI8C0e@rafael.j.wysocki
1 parent 0f61b18 commit 8f334e3

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

drivers/acpi/x86/s2idle.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -515,7 +515,8 @@ static struct acpi_scan_handler lps0_handler = {
515515

516516
static int acpi_s2idle_begin_lps0(void)
517517
{
518-
if (pm_debug_messages_on && !lpi_constraints_table) {
518+
if (lps0_device_handle && !sleep_no_lps0 && pm_debug_messages_on &&
519+
!lpi_constraints_table) {
519520
if (acpi_s2idle_vendor_amd())
520521
lpi_device_get_constraints_amd();
521522
else

0 commit comments

Comments
 (0)