diff options
Diffstat (limited to 'drivers/acpi/utilities/utdelete.c')
-rw-r--r-- | drivers/acpi/utilities/utdelete.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/drivers/acpi/utilities/utdelete.c b/drivers/acpi/utilities/utdelete.c index 42609d3a8aa9..d197c6b29e17 100644 --- a/drivers/acpi/utilities/utdelete.c +++ b/drivers/acpi/utilities/utdelete.c | |||
@@ -45,7 +45,6 @@ | |||
45 | #include <acpi/acinterp.h> | 45 | #include <acpi/acinterp.h> |
46 | #include <acpi/acnamesp.h> | 46 | #include <acpi/acnamesp.h> |
47 | #include <acpi/acevents.h> | 47 | #include <acpi/acevents.h> |
48 | #include <acpi/amlcode.h> | ||
49 | 48 | ||
50 | #define _COMPONENT ACPI_UTILITIES | 49 | #define _COMPONENT ACPI_UTILITIES |
51 | ACPI_MODULE_NAME("utdelete") | 50 | ACPI_MODULE_NAME("utdelete") |
@@ -548,8 +547,8 @@ acpi_ut_update_object_reference(union acpi_operand_object *object, u16 action) | |||
548 | * reference must track changes to the ref count of the index or | 547 | * reference must track changes to the ref count of the index or |
549 | * target object. | 548 | * target object. |
550 | */ | 549 | */ |
551 | if ((object->reference.opcode == AML_INDEX_OP) || | 550 | if ((object->reference.class == ACPI_REFCLASS_INDEX) || |
552 | (object->reference.opcode == AML_INT_NAMEPATH_OP)) { | 551 | (object->reference.class == ACPI_REFCLASS_NAME)) { |
553 | next_object = object->reference.object; | 552 | next_object = object->reference.object; |
554 | } | 553 | } |
555 | break; | 554 | break; |
@@ -586,6 +585,13 @@ acpi_ut_update_object_reference(union acpi_operand_object *object, u16 action) | |||
586 | ACPI_EXCEPTION((AE_INFO, status, | 585 | ACPI_EXCEPTION((AE_INFO, status, |
587 | "Could not update object reference count")); | 586 | "Could not update object reference count")); |
588 | 587 | ||
588 | /* Free any stacked Update State objects */ | ||
589 | |||
590 | while (state_list) { | ||
591 | state = acpi_ut_pop_generic_state(&state_list); | ||
592 | acpi_ut_delete_generic_state(state); | ||
593 | } | ||
594 | |||
589 | return_ACPI_STATUS(status); | 595 | return_ACPI_STATUS(status); |
590 | } | 596 | } |
591 | 597 | ||