From mboxrd@z Thu Jan 1 00:00:00 1970 From: John Keller Subject: [PATCH 1/1] - acpi_unload_table_id() always returns error Date: Thu, 15 Feb 2007 14:08:30 -0600 Message-ID: <20070215200830.1822.98901.sendpatchset@attica.americas.sgi.com> Return-path: Received: from netops-testserver-3-out.sgi.com ([192.48.171.28]:37233 "EHLO netops-testserver-3.corp.sgi.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1161193AbXBOUfR (ORCPT ); Thu, 15 Feb 2007 15:35:17 -0500 Sender: linux-acpi-owner@vger.kernel.org List-Id: linux-acpi@vger.kernel.org To: linux-acpi@vger.kernel.org Cc: ayoung@sgi.com, linux-ia64@vger.kernel.org, linux-kernel@vger.kernel.org, John Keller 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: John Keller --- Index: release/drivers/acpi/tables/tbxface.c =================================================================== --- release.orig/drivers/acpi/tables/tbxface.c 2007-02-13 08:20:42.000000000 -0600 +++ release/drivers/acpi/tables/tbxface.c 2007-02-15 14:04:07.855248010 -0600 @@ -338,9 +338,9 @@ acpi_status acpi_unload_table_id(acpi_ow int i; 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) { if (id != acpi_gbl_root_table_list.tables[i].owner_id) { continue; @@ -352,8 +352,9 @@ acpi_status acpi_unload_table_id(acpi_ow * simply a position within the hierarchy */ 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); + break; } return_ACPI_STATUS(status); }