summaryrefslogtreecommitdiffstats
path: root/sys/contrib/dev/acpica/components/namespace/nsrepair2.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/contrib/dev/acpica/components/namespace/nsrepair2.c')
-rw-r--r--sys/contrib/dev/acpica/components/namespace/nsrepair2.c28
1 files changed, 15 insertions, 13 deletions
diff --git a/sys/contrib/dev/acpica/components/namespace/nsrepair2.c b/sys/contrib/dev/acpica/components/namespace/nsrepair2.c
index 85379e6..6bfd17a 100644
--- a/sys/contrib/dev/acpica/components/namespace/nsrepair2.c
+++ b/sys/contrib/dev/acpica/components/namespace/nsrepair2.c
@@ -501,19 +501,7 @@ AcpiNsRepair_CST (
/*
- * Entries (subpackages) in the _CST Package must be sorted by the
- * C-state type, in ascending order.
- */
- Status = AcpiNsCheckSortedList (Info, ReturnObject, 1, 4, 1,
- ACPI_SORT_ASCENDING, "C-State Type");
- if (ACPI_FAILURE (Status))
- {
- return (Status);
- }
-
- /*
- * We now know the list is correctly sorted by C-state type. Check if
- * the C-state type values are proportional.
+ * Check if the C-state type values are proportional.
*/
OuterElementCount = ReturnObject->Package.Count - 1;
i = 0;
@@ -527,6 +515,7 @@ AcpiNsRepair_CST (
ACPI_WARN_PREDEFINED ((AE_INFO, Info->FullPathname, Info->NodeFlags,
"SubPackage[%u] - removing entry due to zero count", i));
Removing = TRUE;
+ goto RemoveElement;
}
ObjDesc = (*OuterElements)->Package.Elements[1]; /* Index1 = Type */
@@ -537,6 +526,7 @@ AcpiNsRepair_CST (
Removing = TRUE;
}
+RemoveElement:
if (Removing)
{
AcpiNsRemoveElement (ReturnObject, i + 1);
@@ -552,6 +542,18 @@ AcpiNsRepair_CST (
ObjDesc = ReturnObject->Package.Elements[0];
ObjDesc->Integer.Value = OuterElementCount;
+
+ /*
+ * Entries (subpackages) in the _CST Package must be sorted by the
+ * C-state type, in ascending order.
+ */
+ Status = AcpiNsCheckSortedList (Info, ReturnObject, 1, 4, 1,
+ ACPI_SORT_ASCENDING, "C-State Type");
+ if (ACPI_FAILURE (Status))
+ {
+ return (Status);
+ }
+
return (AE_OK);
}
OpenPOWER on IntegriCloud