summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Moore <Robert.Moore@intel.com>2014-01-24 13:00:33 -0800
committerRobert Moore <Robert.Moore@intel.com>2014-01-24 13:00:33 -0800
commitda9638542c6ccc61448d6caaf27a6581831ba7d6 (patch)
treebb0a1b984a3820a526f575f94e1681ae0a005ee2
parent734eba51b927bf88000c3ea50e1c4669a8e53f2e (diff)
Restore code that repairs NULL package elements in return values.
The original code was lost accidently, it was not generated along with the following commit of mechanism improvements and thus not get merged: Commit: 6cb3c06d1ba242c10e01ee8be73f6dc6d8c33800 Subject: [PATCH] Add mechanism for early object repairs on a per-name basis. Adds the framework to allow object repairs very early in the return object analysis. Enables repairs like string->unicode, etc. This patch restores the implementation of the NULL element repair code for ACPI_RTYPE_NONE. In the original design, ACPI_RTYPE_NONE is defined to collect simple NULL object repairs. Lv Zheng.
-rw-r--r--source/components/namespace/nsrepair.c21
1 files changed, 18 insertions, 3 deletions
diff --git a/source/components/namespace/nsrepair.c b/source/components/namespace/nsrepair.c
index 6cf826ede..b8b223568 100644
--- a/source/components/namespace/nsrepair.c
+++ b/source/components/namespace/nsrepair.c
@@ -284,14 +284,29 @@ AcpiNsSimpleRepair (
* this predefined name. Either one return value is expected, or none,
* for both methods and other objects.
*
- * Exit now if there is no return object. Warning if one was expected.
+ * Try to fix if there was no return object. Warning if failed to fix.
*/
if (!ReturnObject)
{
if (ExpectedBtypes && (!(ExpectedBtypes & ACPI_RTYPE_NONE)))
{
- ACPI_WARN_PREDEFINED ((AE_INFO, Info->FullPathname,
- ACPI_WARN_ALWAYS, "Missing expected return value"));
+ if (PackageIndex != ACPI_NOT_PACKAGE_ELEMENT)
+ {
+ ACPI_WARN_PREDEFINED ((AE_INFO, Info->FullPathname,
+ ACPI_WARN_ALWAYS, "Found unexpected NULL package element"));
+
+ Status = AcpiNsRepairNullElement (Info, ExpectedBtypes,
+ PackageIndex, ReturnObjectPtr);
+ if (ACPI_SUCCESS (Status))
+ {
+ return (AE_OK); /* Repair was successful */
+ }
+ }
+ else
+ {
+ ACPI_WARN_PREDEFINED ((AE_INFO, Info->FullPathname,
+ ACPI_WARN_ALWAYS, "Missing expected return value"));
+ }
return (AE_AML_NO_RETURN_VALUE);
}