summaryrefslogtreecommitdiff
path: root/source/components/namespace/nsxfeval.c
diff options
context:
space:
mode:
authorJung-uk Kim <jkim@FreeBSD.org>2017-12-14 22:56:53 +0000
committerJung-uk Kim <jkim@FreeBSD.org>2017-12-14 22:56:53 +0000
commit9ff5d7eeed8c4043df7a61ffe5fd37b481537884 (patch)
treeae5d2fdb93f45dd3fa526aa0d7a67ad8e8c98ec7 /source/components/namespace/nsxfeval.c
parente692a0ddd0131f04acfda4c63b1a4c0c805feef5 (diff)
Notes
Diffstat (limited to 'source/components/namespace/nsxfeval.c')
-rw-r--r--source/components/namespace/nsxfeval.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/source/components/namespace/nsxfeval.c b/source/components/namespace/nsxfeval.c
index ab3ad5988549..cb31e1312327 100644
--- a/source/components/namespace/nsxfeval.c
+++ b/source/components/namespace/nsxfeval.c
@@ -174,11 +174,11 @@ AcpiNsResolveReferences (
*
* PARAMETERS: Handle - Object handle (optional)
* Pathname - Object pathname (optional)
- * ExternalParams - List of parameters to pass to method,
+ * ExternalParams - List of parameters to pass to a method,
* terminated by NULL. May be NULL
* if no parameters are being passed.
- * ReturnBuffer - Where to put method's return value (if
- * any). If NULL, no value is returned.
+ * ReturnBuffer - Where to put the object return value (if
+ * any). Required.
* ReturnType - Expected type of return object
*
* RETURN: Status
@@ -218,10 +218,16 @@ AcpiEvaluateObjectTyped (
FreeBufferOnError = TRUE;
}
- Status = AcpiGetHandle (Handle, Pathname, &TargetHandle);
- if (ACPI_FAILURE (Status))
+ /* Get a handle here, in order to build an error message if needed */
+
+ TargetHandle = Handle;
+ if (Pathname)
{
- return_ACPI_STATUS (Status);
+ Status = AcpiGetHandle (Handle, Pathname, &TargetHandle);
+ if (ACPI_FAILURE (Status))
+ {
+ return_ACPI_STATUS (Status);
+ }
}
FullPathname = AcpiNsGetExternalPathname (TargetHandle);