summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Moore <Robert.Moore@intel.com>2014-01-24 12:57:59 -0800
committerRobert Moore <Robert.Moore@intel.com>2014-01-24 12:57:59 -0800
commit734eba51b927bf88000c3ea50e1c4669a8e53f2e (patch)
tree1e65be6567330339e1036ccb54d9636518c92478
parent91c762f8556c8c7d19ae5184ee5414d9e8e9720c (diff)
Properly handle NULL entries in _PRT return packages.
This change enables proper handling of NULL package entries in a _PRT return value, during construction of the PCI routing table. Lv Zheng.
-rw-r--r--source/components/resources/rscreate.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/source/components/resources/rscreate.c b/source/components/resources/rscreate.c
index c86a5d063..9dc709dec 100644
--- a/source/components/resources/rscreate.c
+++ b/source/components/resources/rscreate.c
@@ -389,7 +389,7 @@ AcpiRsCreatePciRoutingTable (
/* 1) First subobject: Dereference the PRT.Address */
ObjDesc = SubObjectList[0];
- if (ObjDesc->Common.Type != ACPI_TYPE_INTEGER)
+ if (!ObjDesc || ObjDesc->Common.Type != ACPI_TYPE_INTEGER)
{
ACPI_ERROR ((AE_INFO, "(PRT[%u].Address) Need Integer, found %s",
Index, AcpiUtGetObjectTypeName (ObjDesc)));
@@ -401,7 +401,7 @@ AcpiRsCreatePciRoutingTable (
/* 2) Second subobject: Dereference the PRT.Pin */
ObjDesc = SubObjectList[1];
- if (ObjDesc->Common.Type != ACPI_TYPE_INTEGER)
+ if (!ObjDesc || ObjDesc->Common.Type != ACPI_TYPE_INTEGER)
{
ACPI_ERROR ((AE_INFO, "(PRT[%u].Pin) Need Integer, found %s",
Index, AcpiUtGetObjectTypeName (ObjDesc)));
@@ -482,7 +482,7 @@ AcpiRsCreatePciRoutingTable (
/* 4) Fourth subobject: Dereference the PRT.SourceIndex */
ObjDesc = SubObjectList[3];
- if (ObjDesc->Common.Type != ACPI_TYPE_INTEGER)
+ if (!ObjDesc || ObjDesc->Common.Type != ACPI_TYPE_INTEGER)
{
ACPI_ERROR ((AE_INFO,
"(PRT[%u].SourceIndex) Need Integer, found %s",