diff options
Diffstat (limited to 'drivers/acpi/acpica/nsalloc.c')
-rw-r--r-- | drivers/acpi/acpica/nsalloc.c | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/drivers/acpi/acpica/nsalloc.c b/drivers/acpi/acpica/nsalloc.c index aceb93111967..efc971ab7d65 100644 --- a/drivers/acpi/acpica/nsalloc.c +++ b/drivers/acpi/acpica/nsalloc.c | |||
@@ -334,9 +334,7 @@ void acpi_ns_delete_namespace_subtree(struct acpi_namespace_node *parent_node) | |||
334 | 334 | ||
335 | /* Get the next node in this scope (NULL if none) */ | 335 | /* Get the next node in this scope (NULL if none) */ |
336 | 336 | ||
337 | child_node = | 337 | child_node = acpi_ns_get_next_node(parent_node, child_node); |
338 | acpi_ns_get_next_node(ACPI_TYPE_ANY, parent_node, | ||
339 | child_node); | ||
340 | if (child_node) { | 338 | if (child_node) { |
341 | 339 | ||
342 | /* Found a child node - detach any attached object */ | 340 | /* Found a child node - detach any attached object */ |
@@ -345,8 +343,7 @@ void acpi_ns_delete_namespace_subtree(struct acpi_namespace_node *parent_node) | |||
345 | 343 | ||
346 | /* Check if this node has any children */ | 344 | /* Check if this node has any children */ |
347 | 345 | ||
348 | if (acpi_ns_get_next_node | 346 | if (child_node->child) { |
349 | (ACPI_TYPE_ANY, child_node, NULL)) { | ||
350 | /* | 347 | /* |
351 | * There is at least one child of this node, | 348 | * There is at least one child of this node, |
352 | * visit the node | 349 | * visit the node |
@@ -432,9 +429,7 @@ void acpi_ns_delete_namespace_by_owner(acpi_owner_id owner_id) | |||
432 | * Get the next child of this parent node. When child_node is NULL, | 429 | * Get the next child of this parent node. When child_node is NULL, |
433 | * the first child of the parent is returned | 430 | * the first child of the parent is returned |
434 | */ | 431 | */ |
435 | child_node = | 432 | child_node = acpi_ns_get_next_node(parent_node, child_node); |
436 | acpi_ns_get_next_node(ACPI_TYPE_ANY, parent_node, | ||
437 | child_node); | ||
438 | 433 | ||
439 | if (deletion_node) { | 434 | if (deletion_node) { |
440 | acpi_ns_delete_children(deletion_node); | 435 | acpi_ns_delete_children(deletion_node); |
@@ -452,8 +447,7 @@ void acpi_ns_delete_namespace_by_owner(acpi_owner_id owner_id) | |||
452 | 447 | ||
453 | /* Check if this node has any children */ | 448 | /* Check if this node has any children */ |
454 | 449 | ||
455 | if (acpi_ns_get_next_node | 450 | if (child_node->child) { |
456 | (ACPI_TYPE_ANY, child_node, NULL)) { | ||
457 | /* | 451 | /* |
458 | * There is at least one child of this node, | 452 | * There is at least one child of this node, |
459 | * visit the node | 453 | * visit the node |