[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <d6a663f690cde8e3a40ca0262cdd43b344df48c7.1398817612.git.lv.zheng@intel.com>
Date: Wed, 30 Apr 2014 10:04:20 +0800
From: Lv Zheng <lv.zheng@...el.com>
To: "Rafael J. Wysocki" <rafael.j.wysocki@...el.com>,
Len Brown <len.brown@...el.com>
Cc: Lv Zheng <lv.zheng@...el.com>, Lv Zheng <zetalog@...il.com>,
<linux-kernel@...r.kernel.org>, linux-acpi@...r.kernel.org,
"David E. Box" <david.e.box@...ux.intel.com>,
Bob Moore <robert.moore@...el.com>
Subject: [PATCH 08/27] ACPICA: Update handling of PCI ID lists.
From: "David E. Box" <david.e.box@...ux.intel.com>
More of a style cleanup. if hw_build_pci_list is to return a non-zero
status, it now deletes any partial ID list that has been constructed.
if it returns AE_OK, the caller is responsible for list deletion.
David Box.
Signed-off-by: David E. Box <david.e.box@...ux.intel.com>
Signed-off-by: Bob Moore <robert.moore@...el.com>
Signed-off-by: Lv Zheng <lv.zheng@...el.com>
---
drivers/acpi/acpica/hwpci.c | 15 ++++++++++++---
1 file changed, 12 insertions(+), 3 deletions(-)
diff --git a/drivers/acpi/acpica/hwpci.c b/drivers/acpi/acpica/hwpci.c
index e701d8c..6aade8e 100644
--- a/drivers/acpi/acpica/hwpci.c
+++ b/drivers/acpi/acpica/hwpci.c
@@ -140,11 +140,12 @@ acpi_hw_derive_pci_id(struct acpi_pci_id *pci_id,
/* Walk the list, updating the PCI device/function/bus numbers */
status = acpi_hw_process_pci_list(pci_id, list_head);
- }
- /* Always delete the list */
+ /* Delete the list */
+
+ acpi_hw_delete_pci_list(list_head);
+ }
- acpi_hw_delete_pci_list(list_head);
return_ACPI_STATUS(status);
}
@@ -187,6 +188,10 @@ acpi_hw_build_pci_list(acpi_handle root_pci_device,
while (1) {
status = acpi_get_parent(current_device, &parent_device);
if (ACPI_FAILURE(status)) {
+
+ /* Must delete the list before exit */
+
+ acpi_hw_delete_pci_list(*return_list_head);
return (status);
}
@@ -199,6 +204,10 @@ acpi_hw_build_pci_list(acpi_handle root_pci_device,
list_element = ACPI_ALLOCATE(sizeof(struct acpi_pci_device));
if (!list_element) {
+
+ /* Must delete the list before exit */
+
+ acpi_hw_delete_pci_list(*return_list_head);
return (AE_NO_MEMORY);
}
--
1.7.10
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists