]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
ACPI: PM: s2idle: Add missing checks to acpi_s2idle_begin_lps0()
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Wed, 7 Jan 2026 15:14:55 +0000 (16:14 +0100)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Mon, 12 Jan 2026 18:33:29 +0000 (19:33 +0100)
Commit 32ece31db4df ("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: 32ece31db4df ("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
drivers/acpi/x86/s2idle.c

index 6d4d06236f616f5b2664ba1e00d5a78415400e8d..2a9edb53d5d453df926fe6a961db2f85a6b98724 100644 (file)
@@ -515,7 +515,8 @@ static struct acpi_scan_handler lps0_handler = {
 
 static int acpi_s2idle_begin_lps0(void)
 {
-       if (pm_debug_messages_on && !lpi_constraints_table) {
+       if (lps0_device_handle && !sleep_no_lps0 && pm_debug_messages_on &&
+           !lpi_constraints_table) {
                if (acpi_s2idle_vendor_amd())
                        lpi_device_get_constraints_amd();
                else