Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ecb5f752 authored by John Keller's avatar John Keller Committed by Len Brown
Browse files

ACPI: acpi_unload_table_id() always returns error



acpi_unload_table_id() is always returning an error status.
Also, once the matching table is found, don't bother looking
for another match.

Signed-off-by: default avatarJohn Keller <jpk@sgi.com>
Signed-off-by: default avatarLen Brown <len.brown@intel.com>
parent c24e912b
Loading
Loading
Loading
Loading
+4 −3
Original line number Original line Diff line number Diff line
@@ -338,9 +338,9 @@ acpi_status acpi_unload_table_id(acpi_owner_id id)
	int i;
	int i;
	acpi_status status = AE_NOT_EXIST;
	acpi_status status = AE_NOT_EXIST;


	ACPI_FUNCTION_TRACE(acpi_unload_table);
	ACPI_FUNCTION_TRACE(acpi_unload_table_id);


	/* Find table from the requested type list */
	/* Find table in the global table list */
	for (i = 0; i < acpi_gbl_root_table_list.count; ++i) {
	for (i = 0; i < acpi_gbl_root_table_list.count; ++i) {
		if (id != acpi_gbl_root_table_list.tables[i].owner_id) {
		if (id != acpi_gbl_root_table_list.tables[i].owner_id) {
			continue;
			continue;
@@ -352,8 +352,9 @@ acpi_status acpi_unload_table_id(acpi_owner_id id)
		* simply a position within the hierarchy
		* simply a position within the hierarchy
		*/
		*/
		acpi_tb_delete_namespace_by_owner(i);
		acpi_tb_delete_namespace_by_owner(i);
		acpi_tb_release_owner_id(i);
		status = acpi_tb_release_owner_id(i);
		acpi_tb_set_table_loaded_flag(i, FALSE);
		acpi_tb_set_table_loaded_flag(i, FALSE);
		break;
	}
	}
	return_ACPI_STATUS(status);
	return_ACPI_STATUS(status);
}
}