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)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Mon, 21 Aug 2023 18:28:20 +0000 (20:28 +0200)
commit9cc8cd086f05d9a01026c65c98da88561e9c619e
treec05f0707e7aaca0802bc7535bf2c9e700e8e49c7
parent883cf0d4cf288313b71146ddebdf5d647b76c78b
ACPI: x86: s2idle: Fix a logic error parsing AMD constraints table

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>
drivers/acpi/x86/s2idle.c