summaryrefslogtreecommitdiff
path: root/source/compiler/aslanalyze.c
diff options
context:
space:
mode:
Diffstat (limited to 'source/compiler/aslanalyze.c')
-rw-r--r--source/compiler/aslanalyze.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/source/compiler/aslanalyze.c b/source/compiler/aslanalyze.c
index 9139f4e979c0e..63feba2b127b5 100644
--- a/source/compiler/aslanalyze.c
+++ b/source/compiler/aslanalyze.c
@@ -151,6 +151,7 @@
#include "aslcompiler.h"
#include "aslcompiler.y.h"
+#include "acnamesp.h"
#include <string.h>
@@ -421,6 +422,7 @@ AnCheckMethodReturnValue (
{
ACPI_PARSE_OBJECT *OwningOp;
ACPI_NAMESPACE_NODE *Node;
+ char *ExternalPath;
Node = ArgOp->Asl.Node;
@@ -435,18 +437,19 @@ AnCheckMethodReturnValue (
/* Examine the parent op of this method */
OwningOp = Node->Op;
+ ExternalPath = AcpiNsGetNormalizedPathname (Node, TRUE);
+
if (OwningOp->Asl.CompileFlags & OP_METHOD_NO_RETVAL)
{
/* Method NEVER returns a value */
- AslError (ASL_ERROR, ASL_MSG_NO_RETVAL, Op, Op->Asl.ExternalName);
+ AslError (ASL_ERROR, ASL_MSG_NO_RETVAL, Op, ExternalPath);
}
else if (OwningOp->Asl.CompileFlags & OP_METHOD_SOME_NO_RETVAL)
{
/* Method SOMETIMES returns a value, SOMETIMES not */
- AslError (ASL_WARNING, ASL_MSG_SOME_NO_RETVAL,
- Op, Op->Asl.ExternalName);
+ AslError (ASL_WARNING, ASL_MSG_SOME_NO_RETVAL, Op, ExternalPath);
}
else if (!(ThisNodeBtype & RequiredBtypes))
{
@@ -470,6 +473,11 @@ AnCheckMethodReturnValue (
AslError (ASL_ERROR, ASL_MSG_INVALID_TYPE, ArgOp, AslGbl_MsgBuffer);
}
}
+
+ if (ExternalPath)
+ {
+ ACPI_FREE (ExternalPath);
+ }
}