summaryrefslogtreecommitdiffstats
path: root/sys/contrib/dev/acpica/components/executer/exresolv.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/contrib/dev/acpica/components/executer/exresolv.c')
-rw-r--r--sys/contrib/dev/acpica/components/executer/exresolv.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/sys/contrib/dev/acpica/components/executer/exresolv.c b/sys/contrib/dev/acpica/components/executer/exresolv.c
index 32862a9..bead3e4 100644
--- a/sys/contrib/dev/acpica/components/executer/exresolv.c
+++ b/sys/contrib/dev/acpica/components/executer/exresolv.c
@@ -351,8 +351,8 @@ AcpiExResolveMultiple (
ACPI_OBJECT_TYPE *ReturnType,
ACPI_OPERAND_OBJECT **ReturnDesc)
{
- ACPI_OPERAND_OBJECT *ObjDesc = (void *) Operand;
- ACPI_NAMESPACE_NODE *Node;
+ ACPI_OPERAND_OBJECT *ObjDesc = ACPI_CAST_PTR (void, Operand);
+ ACPI_NAMESPACE_NODE *Node = ACPI_CAST_PTR (ACPI_NAMESPACE_NODE, Operand);
ACPI_OBJECT_TYPE Type;
ACPI_STATUS Status;
@@ -372,7 +372,7 @@ AcpiExResolveMultiple (
case ACPI_DESC_TYPE_NAMED:
Type = ((ACPI_NAMESPACE_NODE *) ObjDesc)->Type;
- ObjDesc = AcpiNsGetAttachedObject ((ACPI_NAMESPACE_NODE *) ObjDesc);
+ ObjDesc = AcpiNsGetAttachedObject (Node);
/* If we had an Alias node, use the attached object for type info */
@@ -381,6 +381,14 @@ AcpiExResolveMultiple (
Type = ((ACPI_NAMESPACE_NODE *) ObjDesc)->Type;
ObjDesc = AcpiNsGetAttachedObject ((ACPI_NAMESPACE_NODE *) ObjDesc);
}
+
+ if (!ObjDesc)
+ {
+ ACPI_ERROR ((AE_INFO,
+ "[%4.4s] Node is unresolved or uninitialized",
+ AcpiUtGetNodeName (Node)));
+ return_ACPI_STATUS (AE_AML_UNINITIALIZED_NODE);
+ }
break;
default:
OpenPOWER on IntegriCloud