[PATCH v2 40/42] ACPICA: utilities: Clear NextObject so the outer loop doesn't read it

From: Maciej Wieczor-Retman

Date: Fri Nov 20 2026 - 12:24:15 EST


If the inner 'while (PrevObject)' loop exits after NextObject was
already set to the PrevObject->Notify.Next[i], then at the end of the
outer loop, 'if (NextObject)' check will save that discarded object.

Set the unwanted NextObject to NULL before breaking the inner loop so it
doesn't get saved for the next iteration of the outer loop.

Link: https://github.com/acpica/acpica/commit/942f4fcfb1ce
Signed-off-by: Maciej Wieczor-Retman <maciej.wieczor-retman@xxxxxxxxx>
---
drivers/acpi/acpica/utdelete.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/acpi/acpica/utdelete.c b/drivers/acpi/acpica/utdelete.c
index 57a0de6a49d6..7645c14aac68 100644
--- a/drivers/acpi/acpica/utdelete.c
+++ b/drivers/acpi/acpica/utdelete.c
@@ -519,6 +519,7 @@ acpi_ut_update_object_reference(union acpi_operand_object *object, u16 action)
while (prev_object) {
if (prev_object->common.type !=
ACPI_TYPE_LOCAL_NOTIFY) {
+ next_object = NULL;
break;
}
next_object =
--
2.56.0