ACPI: x86: s2idle: Fix a logic error parsing AMD constraints table
authorMario Limonciello <mario.limonciello@amd.com>
Fri, 18 Aug 2023 19:40:04 +0000 (14:40 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 13 Sep 2023 07:42:29 +0000 (09:42 +0200)
commit7c70932568068b1396f20c27b43275c4915cb21b
treeb6172e87de2d9f8971bdb30598217def5932da8b
parenta99f32b81ca18221aa1143a5fc0b26adeec5d592
ACPI: x86: s2idle: Fix a logic error parsing AMD constraints table

[ Upstream commit 9cc8cd086f05d9a01026c65c98da88561e9c619e ]

The constraints table should be resetting the `list` object
after running through all of `info_obj` iterations.

This adjusts whitespace as well as less code will now be included
with each loop. This fixes a functional problem is fixed where a
badly formed package in the inner loop may have incorrect data.

Fixes: 146f1ed852a8 ("ACPI: PM: s2idle: Add AMD support to handle _DSM")
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/acpi/x86/s2idle.c