diff options
| -rw-r--r-- | drivers/acpi/acpica/nsalloc.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/drivers/acpi/acpica/nsalloc.c b/drivers/acpi/acpica/nsalloc.c index 243737363fb8..bc3f598257a2 100644 --- a/drivers/acpi/acpica/nsalloc.c +++ b/drivers/acpi/acpica/nsalloc.c | |||
| @@ -106,6 +106,7 @@ struct acpi_namespace_node *acpi_ns_create_node(u32 name) | |||
| 106 | void acpi_ns_delete_node(struct acpi_namespace_node *node) | 106 | void acpi_ns_delete_node(struct acpi_namespace_node *node) |
| 107 | { | 107 | { |
| 108 | union acpi_operand_object *obj_desc; | 108 | union acpi_operand_object *obj_desc; |
| 109 | union acpi_operand_object *next_desc; | ||
| 109 | 110 | ||
| 110 | ACPI_FUNCTION_NAME(ns_delete_node); | 111 | ACPI_FUNCTION_NAME(ns_delete_node); |
| 111 | 112 | ||
| @@ -114,12 +115,13 @@ void acpi_ns_delete_node(struct acpi_namespace_node *node) | |||
| 114 | acpi_ns_detach_object(node); | 115 | acpi_ns_detach_object(node); |
| 115 | 116 | ||
| 116 | /* | 117 | /* |
| 117 | * Delete an attached data object if present (an object that was created | 118 | * Delete an attached data object list if present (objects that were |
| 118 | * and attached via acpi_attach_data). Note: After any normal object is | 119 | * attached via acpi_attach_data). Note: After any normal object is |
| 119 | * detached above, the only possible remaining object is a data object. | 120 | * detached above, the only possible remaining object(s) are data |
| 121 | * objects, in a linked list. | ||
| 120 | */ | 122 | */ |
| 121 | obj_desc = node->object; | 123 | obj_desc = node->object; |
| 122 | if (obj_desc && (obj_desc->common.type == ACPI_TYPE_LOCAL_DATA)) { | 124 | while (obj_desc && (obj_desc->common.type == ACPI_TYPE_LOCAL_DATA)) { |
| 123 | 125 | ||
| 124 | /* Invoke the attached data deletion handler if present */ | 126 | /* Invoke the attached data deletion handler if present */ |
| 125 | 127 | ||
| @@ -127,7 +129,9 @@ void acpi_ns_delete_node(struct acpi_namespace_node *node) | |||
| 127 | obj_desc->data.handler(node, obj_desc->data.pointer); | 129 | obj_desc->data.handler(node, obj_desc->data.pointer); |
| 128 | } | 130 | } |
| 129 | 131 | ||
| 132 | next_desc = obj_desc->common.next_object; | ||
| 130 | acpi_ut_remove_reference(obj_desc); | 133 | acpi_ut_remove_reference(obj_desc); |
| 134 | obj_desc = next_desc; | ||
| 131 | } | 135 | } |
| 132 | 136 | ||
| 133 | /* Now we can delete the node */ | 137 | /* Now we can delete the node */ |
