Commit 7817e265 authored by Bob Moore's avatar Bob Moore Committed by Rafael J. Wysocki

ACPICA: Fix a regression for deletion of Alias() objects.

Fixes a regression introduced by commit e23d9b82 (ACPICA:
Namespace: Properly null terminate objects detached from a namespace
node)

In the case of Alias namespace nodes, the node simply points to the aliased
node via the Object field; thus we cannot assume that the object is an
operand object.

Fixes: e23d9b82 (ACPICA: Namespace: Properly null terminate objects detached from a namespace node)
Signed-off-by: default avatarBob Moore <robert.moore@intel.com>
Signed-off-by: default avatarLv Zheng <lv.zheng@intel.com>
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
parent 587fc727
...@@ -237,17 +237,16 @@ void acpi_ns_detach_object(struct acpi_namespace_node *node) ...@@ -237,17 +237,16 @@ void acpi_ns_detach_object(struct acpi_namespace_node *node)
(node->object->common.type != ACPI_TYPE_LOCAL_DATA)) { (node->object->common.type != ACPI_TYPE_LOCAL_DATA)) {
node->object = node->object->common.next_object; node->object = node->object->common.next_object;
} }
}
/* /*
* Detach the object from any data objects (which are still held by * Detach the object from any data objects (which are still held by
* the namespace node) * the namespace node)
*/ */
if (obj_desc->common.next_object &&
if (obj_desc->common.next_object && ((obj_desc->common.next_object)->common.type ==
((obj_desc->common.next_object)->common.type == ACPI_TYPE_LOCAL_DATA)) {
ACPI_TYPE_LOCAL_DATA)) { obj_desc->common.next_object = NULL;
obj_desc->common.next_object = NULL; }
} }
/* Reset the node type to untyped */ /* Reset the node type to untyped */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment