diff options
| author | Len Brown <len.brown@intel.com> | 2006-07-10 02:39:41 -0400 |
|---|---|---|
| committer | Len Brown <len.brown@intel.com> | 2006-07-10 02:39:41 -0400 |
| commit | 0f12b15ebcedce115a5d8e5ff741e49a7993f67c (patch) | |
| tree | 3bfea88873b2a43c5528b9687fa010b6eff23458 /drivers/acpi/tables/tbinstal.c | |
| parent | 20b499aa06edf59fa2d21f29d42d36586c6c058e (diff) | |
| parent | f6dd9221dddb3550e60d32aee688588ec208312c (diff) | |
Pull acpica-20060707 into test branch
Diffstat (limited to 'drivers/acpi/tables/tbinstal.c')
| -rw-r--r-- | drivers/acpi/tables/tbinstal.c | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/drivers/acpi/tables/tbinstal.c b/drivers/acpi/tables/tbinstal.c index 7ca2df75bb11..1668a232fb67 100644 --- a/drivers/acpi/tables/tbinstal.c +++ b/drivers/acpi/tables/tbinstal.c @@ -256,7 +256,7 @@ acpi_tb_init_table_descriptor(acpi_table_type table_type, status = acpi_ut_allocate_owner_id(&table_desc->owner_id); if (ACPI_FAILURE(status)) { - return_ACPI_STATUS(status); + goto error_exit1; } /* Install the table into the global data structure */ @@ -274,8 +274,8 @@ acpi_tb_init_table_descriptor(acpi_table_type table_type, * at this location, so return an error. */ if (list_head->next) { - ACPI_FREE(table_desc); - return_ACPI_STATUS(AE_ALREADY_EXISTS); + status = AE_ALREADY_EXISTS; + goto error_exit2; } table_desc->next = list_head->next; @@ -335,6 +335,17 @@ acpi_tb_init_table_descriptor(acpi_table_type table_type, table_info->owner_id = table_desc->owner_id; table_info->installed_desc = table_desc; return_ACPI_STATUS(AE_OK); + + /* Error exit with cleanup */ + + error_exit2: + + acpi_ut_release_owner_id(&table_desc->owner_id); + + error_exit1: + + ACPI_FREE(table_desc); + return_ACPI_STATUS(status); } /******************************************************************************* @@ -525,6 +536,10 @@ struct acpi_table_desc *acpi_tb_uninstall_table(struct acpi_table_desc acpi_tb_delete_single_table(table_desc); + /* Free the owner ID associated with this table */ + + acpi_ut_release_owner_id(&table_desc->owner_id); + /* Free the table descriptor */ next_desc = table_desc->next; |
