Revert "ACPI / resources: Use AE_CTRL_TERMINATE to terminate resources walks"
authorDaniel Scally <djrscally@gmail.com>
Sat, 5 Dec 2020 17:04:03 +0000 (17:04 +0000)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Mon, 7 Dec 2020 12:57:39 +0000 (13:57 +0100)
commit12fc4dad94dfac25599f31257aac181c691ca96f
treef85e7daf664b8314293257f1bf6afdf51121d10a
parentb87e745945e3de3e4d5c5eeb53e0e455e5cd5416
Revert "ACPI / resources: Use AE_CTRL_TERMINATE to terminate resources walks"

This reverts commit 8a66790b7850a6669129af078768a1d42076a0ef.

Switching this function to AE_CTRL_TERMINATE broke the documented
behaviour of acpi_dev_get_resources() - AE_CTRL_TERMINATE does not, in
fact, terminate the resource walk because acpi_walk_resource_buffer()
ignores it (specifically converting it to AE_OK), referring to that
value as "an OK termination by the user function". This means that
acpi_dev_get_resources() does not abort processing when the preproc
function returns a negative value.

Signed-off-by: Daniel Scally <djrscally@gmail.com>
Cc: 3.10+ <stable@vger.kernel.org> # 3.10+
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/acpi/resource.c