From eba0ce4c5f1c18dc0b9b8bc21df198f78ed21828 Mon Sep 17 00:00:00 2001 From: njl Date: Thu, 24 Jun 2004 01:57:31 +0000 Subject: Attach the correct handle, not the one that was just deleted. Also, remove some duplicated code. --- sys/dev/acpica/acpi_pci.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'sys/dev/acpica') diff --git a/sys/dev/acpica/acpi_pci.c b/sys/dev/acpica/acpi_pci.c index 8c38e85..ccb64c3 100644 --- a/sys/dev/acpica/acpi_pci.c +++ b/sys/dev/acpica/acpi_pci.c @@ -232,7 +232,7 @@ acpi_pci_update_device(ACPI_HANDLE handle, device_t pci_child) if (ACPI_FAILURE(status)) printf("WARNING: Unable to detach object data from %s - %s\n", acpi_name(handle), AcpiFormatException(status)); - status = AcpiAttachData(handle, acpi_fake_objhandler, child); + status = AcpiAttachData(handle, acpi_fake_objhandler, pci_child); if (ACPI_FAILURE(status)) printf("WARNING: Unable to attach object data to %s - %s\n", acpi_name(handle), AcpiFormatException(status)); @@ -261,8 +261,7 @@ acpi_pci_save_handle(ACPI_HANDLE handle, UINT32 level, void *context, dinfo->ap_dinfo.cfg.slot == slot) { dinfo->ap_handle = handle; acpi_pci_update_device(handle, devlist[i]); - free(devlist, M_TEMP); - return_ACPI_STATUS (AE_OK); + break; } } free(devlist, M_TEMP); -- cgit v1.1