summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--drivers/acpi/acpica/exconfig.c2
-rw-r--r--drivers/acpi/acpica/tbinstal.c7
2 files changed, 2 insertions, 7 deletions
diff --git a/drivers/acpi/acpica/exconfig.c b/drivers/acpi/acpica/exconfig.c
index 649a8efef0f5..11a014ca3935 100644
--- a/drivers/acpi/acpica/exconfig.c
+++ b/drivers/acpi/acpica/exconfig.c
@@ -504,7 +504,7 @@ acpi_ex_load_op(union acpi_operand_object *obj_desc,
/* Delete allocated table buffer */
- acpi_tb_delete_table(&table_desc);
+ ACPI_FREE(table_desc.pointer);
return_ACPI_STATUS(status);
}
diff --git a/drivers/acpi/acpica/tbinstal.c b/drivers/acpi/acpica/tbinstal.c
index 144076ac21f0..0040e19b6d14 100644
--- a/drivers/acpi/acpica/tbinstal.c
+++ b/drivers/acpi/acpica/tbinstal.c
@@ -203,12 +203,6 @@ acpi_tb_add_table(struct acpi_table_desc *table_desc, u32 *table_index)
* need to be unregistered when they are unloaded, and slots in the
* root table list should be reused when empty.
*/
-
- /*
- * Table is already registered.
- * We can delete the table that was passed as a parameter.
- */
- acpi_tb_delete_table(table_desc);
*table_index = i;
if (acpi_gbl_root_table_list.tables[i].
@@ -221,6 +215,7 @@ acpi_tb_add_table(struct acpi_table_desc *table_desc, u32 *table_index)
} else {
/* Table was unloaded, allow it to be reloaded */
+ acpi_tb_delete_table(table_desc);
table_desc->pointer =
acpi_gbl_root_table_list.tables[i].pointer;
table_desc->address =