diff options
Diffstat (limited to 'drivers/acpi/acpica/exconfig.c')
-rw-r--r-- | drivers/acpi/acpica/exconfig.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/acpi/acpica/exconfig.c b/drivers/acpi/acpica/exconfig.c index 3deb20a126b2..c0348ff9a602 100644 --- a/drivers/acpi/acpica/exconfig.c +++ b/drivers/acpi/acpica/exconfig.c | |||
@@ -229,6 +229,8 @@ acpi_ex_load_table_op(struct acpi_walk_state *walk_state, | |||
229 | walk_state); | 229 | walk_state); |
230 | if (ACPI_FAILURE(status)) { | 230 | if (ACPI_FAILURE(status)) { |
231 | (void)acpi_ex_unload_table(ddb_handle); | 231 | (void)acpi_ex_unload_table(ddb_handle); |
232 | |||
233 | acpi_ut_remove_reference(ddb_handle); | ||
232 | return_ACPI_STATUS(status); | 234 | return_ACPI_STATUS(status); |
233 | } | 235 | } |
234 | } | 236 | } |
@@ -454,6 +456,10 @@ acpi_ex_load_op(union acpi_operand_object *obj_desc, | |||
454 | return_ACPI_STATUS(status); | 456 | return_ACPI_STATUS(status); |
455 | } | 457 | } |
456 | 458 | ||
459 | /* Remove the reference by added by acpi_ex_store above */ | ||
460 | |||
461 | acpi_ut_remove_reference(ddb_handle); | ||
462 | |||
457 | /* Invoke table handler if present */ | 463 | /* Invoke table handler if present */ |
458 | 464 | ||
459 | if (acpi_gbl_table_handler) { | 465 | if (acpi_gbl_table_handler) { |
@@ -530,8 +536,5 @@ acpi_status acpi_ex_unload_table(union acpi_operand_object *ddb_handle) | |||
530 | (void)acpi_tb_release_owner_id(table_index); | 536 | (void)acpi_tb_release_owner_id(table_index); |
531 | acpi_tb_set_table_loaded_flag(table_index, FALSE); | 537 | acpi_tb_set_table_loaded_flag(table_index, FALSE); |
532 | 538 | ||
533 | /* Table unloaded, remove a reference to the ddb_handle object */ | ||
534 | |||
535 | acpi_ut_remove_reference(ddb_handle); | ||
536 | return_ACPI_STATUS(AE_OK); | 539 | return_ACPI_STATUS(AE_OK); |
537 | } | 540 | } |