summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Moore <Robert.Moore@intel.com>2013-08-02 12:07:32 -0700
committerRobert Moore <Robert.Moore@intel.com>2013-08-02 12:07:32 -0700
commitb5513899b2931631456f61f5152279d4d505d988 (patch)
treed61fe4b156a5bbc6ee2cd0277c2b7b4b9e26c07d
parent0a13fe8e6b426979687b1dadf5aa254716f1f626 (diff)
downloadacpica-b5513899b2931631456f61f5152279d4d505d988.tar.gz
Parser: Fix handling of NULL target operands.
This is an update to the previous commit to support method invocation as a target operand. Handle the case where an optional target is not specified in the ASL.
-rw-r--r--source/components/parser/psargs.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/source/components/parser/psargs.c b/source/components/parser/psargs.c
index fc06e4f72..af538f828 100644
--- a/source/components/parser/psargs.c
+++ b/source/components/parser/psargs.c
@@ -915,6 +915,29 @@ AcpiPsGetNextArg (
case ARGP_TARGET:
case ARGP_SUPERNAME:
case ARGP_SIMPLENAME:
+
+ /*
+ * Handle the case for a null target or name.
+ * Note: The parser inserts a Zero node for an optional target
+ * that is not specified in the source ASL.
+ */
+ if (AcpiPsPeekOpcode (ParserState) == 0)
+ {
+ Arg = AcpiPsAllocOp (AML_INT_NAMEPATH_OP);
+ if (!Arg)
+ {
+ return_ACPI_STATUS (AE_NO_MEMORY);
+ }
+
+ Status = AcpiPsGetNextNamepath (WalkState, ParserState, Arg, 0);
+ break;
+ }
+
+ /* Single complex argument, nothing returned */
+
+ WalkState->ArgCount = 1;
+ break;
+
case ARGP_DATAOBJ:
case ARGP_TERMARG:
/*