summaryrefslogtreecommitdiffstats
path: root/sys/dev/acpica
diff options
context:
space:
mode:
authornjl <njl@FreeBSD.org>2004-06-24 01:57:31 +0000
committernjl <njl@FreeBSD.org>2004-06-24 01:57:31 +0000
commiteba0ce4c5f1c18dc0b9b8bc21df198f78ed21828 (patch)
treefd2e0169a920fc040429add121e90568c4d5c212 /sys/dev/acpica
parent393e3c5d09edf8d040ec692cb670fe7c239b4ba0 (diff)
downloadFreeBSD-src-eba0ce4c5f1c18dc0b9b8bc21df198f78ed21828.zip
FreeBSD-src-eba0ce4c5f1c18dc0b9b8bc21df198f78ed21828.tar.gz
Attach the correct handle, not the one that was just deleted. Also,
remove some duplicated code.
Diffstat (limited to 'sys/dev/acpica')
-rw-r--r--sys/dev/acpica/acpi_pci.c5
1 files changed, 2 insertions, 3 deletions
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);
OpenPOWER on IntegriCloud