summaryrefslogtreecommitdiffstats
path: root/sys/contrib/dev/acpica/common/dmrestag.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/contrib/dev/acpica/common/dmrestag.c')
-rw-r--r--sys/contrib/dev/acpica/common/dmrestag.c27
1 files changed, 18 insertions, 9 deletions
diff --git a/sys/contrib/dev/acpica/common/dmrestag.c b/sys/contrib/dev/acpica/common/dmrestag.c
index ed8b36b..59a11be 100644
--- a/sys/contrib/dev/acpica/common/dmrestag.c
+++ b/sys/contrib/dev/acpica/common/dmrestag.c
@@ -1,7 +1,6 @@
/******************************************************************************
*
* Module Name: dmrestag - Add tags to resource descriptors (Application-level)
- * $Revision: 1.11 $
*
*****************************************************************************/
@@ -9,7 +8,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2007, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2009, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -115,11 +114,12 @@
*****************************************************************************/
-#include <contrib/dev/acpica/acpi.h>
-#include <contrib/dev/acpica/acparser.h>
-#include <contrib/dev/acpica/acdisasm.h>
-#include <contrib/dev/acpica/acnamesp.h>
-#include <contrib/dev/acpica/amlcode.h>
+#include <contrib/dev/acpica/include/acpi.h>
+#include <contrib/dev/acpica/include/accommon.h>
+#include <contrib/dev/acpica/include/acparser.h>
+#include <contrib/dev/acpica/include/acdisasm.h>
+#include <contrib/dev/acpica/include/acnamesp.h>
+#include <contrib/dev/acpica/include/amlcode.h>
/* This module used for application-level code only */
@@ -636,13 +636,22 @@ AcpiGetTagPathname (
/* Get the full pathname to the parent buffer */
RequiredSize = AcpiNsGetPathnameLength (BufferNode);
+ if (!RequiredSize)
+ {
+ return (NULL);
+ }
+
Pathname = ACPI_ALLOCATE_ZEROED (RequiredSize + ACPI_PATH_SEGMENT_LENGTH);
if (!Pathname)
{
return (NULL);
}
- AcpiNsBuildExternalPath (BufferNode, RequiredSize, Pathname);
+ Status = AcpiNsBuildExternalPath (BufferNode, RequiredSize, Pathname);
+ if (ACPI_FAILURE (Status))
+ {
+ return (NULL);
+ }
/*
* Create the full path to the resource and tag by: remove the buffer name,
@@ -720,7 +729,7 @@ AcpiDmUpdateResourceName (
/* Change the resource descriptor name */
- ResourceNode->Name.Integer = *(UINT32 *) Name;
+ ResourceNode->Name.Integer = *ACPI_CAST_PTR (UINT32, &Name[0]);
}
OpenPOWER on IntegriCloud