aboutsummaryrefslogtreecommitdiffstats
path: root/source/components/namespace/nsrepair2.c
diff options
context:
space:
mode:
Diffstat (limited to 'source/components/namespace/nsrepair2.c')
-rw-r--r--source/components/namespace/nsrepair2.c39
1 files changed, 16 insertions, 23 deletions
diff --git a/source/components/namespace/nsrepair2.c b/source/components/namespace/nsrepair2.c
index f62aca29a5ac..57c229a8c5ee 100644
--- a/source/components/namespace/nsrepair2.c
+++ b/source/components/namespace/nsrepair2.c
@@ -321,16 +321,18 @@ AcpiNsComplexRepairs (
ACPI_STATUS Status;
+ ACPI_FUNCTION_TRACE (NsComplexRepairs);
+
/* Check if this name is in the list of repairable names */
Predefined = AcpiNsMatchComplexRepair (Node);
if (!Predefined)
{
- return (ValidateStatus);
+ return_ACPI_STATUS (ValidateStatus);
}
Status = Predefined->RepairFunction (Info, ReturnObjectPtr);
- return (Status);
+ return_ACPI_STATUS (Status);
}
@@ -526,20 +528,21 @@ AcpiNsRepair_CID (
UINT16 OriginalRefCount;
UINT32 i;
+ ACPI_FUNCTION_TRACE (NsRepair_CID);
/* Check for _CID as a simple string */
if (ReturnObject->Common.Type == ACPI_TYPE_STRING)
{
Status = AcpiNsRepair_HID (Info, ReturnObjectPtr);
- return (Status);
+ return_ACPI_STATUS (Status);
}
/* Exit if not a Package */
if (ReturnObject->Common.Type != ACPI_TYPE_PACKAGE)
{
- return (AE_OK);
+ return_ACPI_STATUS (AE_OK);
}
/* Examine each element of the _CID package */
@@ -553,7 +556,7 @@ AcpiNsRepair_CID (
Status = AcpiNsRepair_HID (Info, ElementPtr);
if (ACPI_FAILURE (Status))
{
- return (Status);
+ return_ACPI_STATUS (Status);
}
if (OriginalElement != *ElementPtr)
@@ -567,7 +570,7 @@ AcpiNsRepair_CID (
ElementPtr++;
}
- return (AE_OK);
+ return_ACPI_STATUS (AE_OK);
}
@@ -687,9 +690,8 @@ AcpiNsRepair_HID (
ACPI_OPERAND_OBJECT **ReturnObjectPtr)
{
ACPI_OPERAND_OBJECT *ReturnObject = *ReturnObjectPtr;
- ACPI_OPERAND_OBJECT *NewString;
- char *Source;
char *Dest;
+ char *Source;
ACPI_FUNCTION_NAME (NsRepair_HID);
@@ -699,7 +701,7 @@ AcpiNsRepair_HID (
if (ReturnObject->Common.Type != ACPI_TYPE_STRING)
{
- return (AE_OK);
+ return_ACPI_STATUS (AE_OK);
}
if (ReturnObject->String.Length == 0)
@@ -711,15 +713,7 @@ AcpiNsRepair_HID (
/* Return AE_OK anyway, let driver handle it */
Info->ReturnFlags |= ACPI_OBJECT_REPAIRED;
- return (AE_OK);
- }
-
- /* It is simplest to always create a new string object */
-
- NewString = AcpiUtCreateStringObject (ReturnObject->String.Length);
- if (!NewString)
- {
- return (AE_NO_MEMORY);
+ return_ACPI_STATUS (AE_OK);
}
/*
@@ -732,7 +726,7 @@ AcpiNsRepair_HID (
if (*Source == '*')
{
Source++;
- NewString->String.Length--;
+ ReturnObject->String.Length--;
ACPI_DEBUG_PRINT ((ACPI_DB_REPAIR,
"%s: Removed invalid leading asterisk\n", Info->FullPathname));
@@ -746,14 +740,13 @@ AcpiNsRepair_HID (
* "NNNN####" where N is an uppercase letter or decimal digit, and
* # is a hex digit.
*/
- for (Dest = NewString->String.Pointer; *Source; Dest++, Source++)
+ for (Dest = ReturnObject->String.Pointer; *Source; Dest++, Source++)
{
*Dest = (char) toupper ((int) *Source);
}
+ ReturnObject->String.Pointer[ReturnObject->String.Length] = 0;
- AcpiUtRemoveReference (ReturnObject);
- *ReturnObjectPtr = NewString;
- return (AE_OK);
+ return_ACPI_STATUS (AE_OK);
}