summaryrefslogtreecommitdiff
path: root/source/components/namespace/nsrepair.c
diff options
context:
space:
mode:
authorJung-uk Kim <jkim@FreeBSD.org>2014-02-17 17:10:41 +0000
committerJung-uk Kim <jkim@FreeBSD.org>2014-02-17 17:10:41 +0000
commit526d99544ba42a5a2155021975b3b97da425819e (patch)
treef33eb960cbd87cb5fa516e45153eb6351dc8ea2e /source/components/namespace/nsrepair.c
parent7bf0bd8c239ae7e6cb5c98382db85377146519d6 (diff)
Notes
Diffstat (limited to 'source/components/namespace/nsrepair.c')
-rw-r--r--source/components/namespace/nsrepair.c25
1 files changed, 20 insertions, 5 deletions
diff --git a/source/components/namespace/nsrepair.c b/source/components/namespace/nsrepair.c
index 282c75e313d1..3b659a91c7a2 100644
--- a/source/components/namespace/nsrepair.c
+++ b/source/components/namespace/nsrepair.c
@@ -212,14 +212,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);
}
@@ -474,7 +489,7 @@ AcpiNsRepairNullElement (
* RETURN: None.
*
* DESCRIPTION: Remove all NULL package elements from packages that contain
- * a variable number of sub-packages. For these types of
+ * a variable number of subpackages. For these types of
* packages, NULL elements can be safely removed.
*
*****************************************************************************/
@@ -498,7 +513,7 @@ AcpiNsRemoveNullElements (
/*
* We can safely remove all NULL elements from these package types:
* PTYPE1_VAR packages contain a variable number of simple data types.
- * PTYPE2 packages contain a variable number of sub-packages.
+ * PTYPE2 packages contain a variable number of subpackages.
*/
switch (PackageType)
{