summaryrefslogtreecommitdiffstats
path: root/sys/contrib/dev/acpica/nsutils.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/contrib/dev/acpica/nsutils.c')
-rw-r--r--sys/contrib/dev/acpica/nsutils.c31
1 files changed, 10 insertions, 21 deletions
diff --git a/sys/contrib/dev/acpica/nsutils.c b/sys/contrib/dev/acpica/nsutils.c
index 79f3e08..835afa6 100644
--- a/sys/contrib/dev/acpica/nsutils.c
+++ b/sys/contrib/dev/acpica/nsutils.c
@@ -2,7 +2,7 @@
*
* Module Name: nsutils - Utilities for accessing ACPI namespace, accessing
* parents and siblings and Scope manipulation
- * $Revision: 72 $
+ * $Revision: 74 $
*
*****************************************************************************/
@@ -825,10 +825,9 @@ AcpiNsGetNode (
NATIVE_CHAR *InternalPath = NULL;
- FUNCTION_TRACE_PTR ("NsGetNte", Pathname);
+ FUNCTION_TRACE_PTR ("NsGetNode", Pathname);
- ScopeInfo.Scope.Node = StartNode;
/* Ensure that the namespace has been initialized */
@@ -854,22 +853,9 @@ AcpiNsGetNode (
AcpiCmAcquireMutex (ACPI_MTX_NAMESPACE);
- /* NS_ALL means start from the root */
-
- if (NS_ALL == ScopeInfo.Scope.Node)
- {
- ScopeInfo.Scope.Node = AcpiGbl_RootNode;
- }
+ /* Setup lookup scope (search starting point) */
- else
- {
- ScopeInfo.Scope.Node = StartNode;
- if (!ScopeInfo.Scope.Node)
- {
- Status = AE_BAD_PARAMETER;
- goto UnlockAndExit;
- }
- }
+ ScopeInfo.Scope.Node = StartNode;
/* Lookup the name in the namespace */
@@ -880,13 +866,11 @@ AcpiNsGetNode (
if (ACPI_FAILURE (Status))
{
- DEBUG_PRINT (ACPI_INFO, ("NsGetNte: %s, %s\n",
+ DEBUG_PRINT (ACPI_INFO, ("NsGetNode: %s, %s\n",
InternalPath, AcpiCmFormatException (Status)));
}
-UnlockAndExit:
-
AcpiCmReleaseMutex (ACPI_MTX_NAMESPACE);
/* Cleanup */
@@ -1007,6 +991,11 @@ AcpiNsGetParentObject (
{
+ if (!Node)
+ {
+ return (NULL);
+ }
+
/*
* Walk to the end of this peer list.
* The last entry is marked with a flag and the peer
OpenPOWER on IntegriCloud