diff options
Diffstat (limited to 'sys/contrib/dev/acpica/components/hardware/hwpci.c')
-rw-r--r-- | sys/contrib/dev/acpica/components/hardware/hwpci.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/sys/contrib/dev/acpica/components/hardware/hwpci.c b/sys/contrib/dev/acpica/components/hardware/hwpci.c index 165d26c..c19100b 100644 --- a/sys/contrib/dev/acpica/components/hardware/hwpci.c +++ b/sys/contrib/dev/acpica/components/hardware/hwpci.c @@ -140,7 +140,7 @@ AcpiHwDerivePciId ( ACPI_HANDLE PciRegion) { ACPI_STATUS Status; - ACPI_PCI_DEVICE *ListHead = NULL; + ACPI_PCI_DEVICE *ListHead; ACPI_FUNCTION_TRACE (HwDerivePciId); @@ -198,7 +198,6 @@ AcpiHwBuildPciList ( ACPI_HANDLE ParentDevice; ACPI_STATUS Status; ACPI_PCI_DEVICE *ListElement; - ACPI_PCI_DEVICE *ListHead = NULL; /* @@ -206,6 +205,7 @@ AcpiHwBuildPciList ( * a list of device nodes. Loop will exit when either the PCI device is * found, or the root of the namespace is reached. */ + *ReturnListHead = NULL; CurrentDevice = PciRegion; while (1) { @@ -222,7 +222,6 @@ AcpiHwBuildPciList ( if (ParentDevice == RootPciDevice) { - *ReturnListHead = ListHead; return (AE_OK); } @@ -237,9 +236,9 @@ AcpiHwBuildPciList ( /* Put new element at the head of the list */ - ListElement->Next = ListHead; + ListElement->Next = *ReturnListHead; ListElement->Device = ParentDevice; - ListHead = ListElement; + *ReturnListHead = ListElement; CurrentDevice = ParentDevice; } |