diff options
author | Lv Zheng <lv.zheng@intel.com> | 2014-02-25 21:29:31 -0500 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2014-02-26 18:45:59 -0500 |
commit | 83130649302a238c8a42322444468430aa97a1fd (patch) | |
tree | 52b6c35d3d576b8512c10c887265c765bdc2f73c /drivers/acpi/acpica/rscreate.c | |
parent | 9ad4caf3f846544b4e2a00674dd3055a8762d5dd (diff) |
ACPICA: 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.
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/acpi/acpica/rscreate.c')
-rw-r--r-- | drivers/acpi/acpica/rscreate.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/acpi/acpica/rscreate.c b/drivers/acpi/acpica/rscreate.c index ca62804178bd..f4cd6cad6607 100644 --- a/drivers/acpi/acpica/rscreate.c +++ b/drivers/acpi/acpica/rscreate.c | |||
@@ -292,7 +292,7 @@ acpi_rs_create_pci_routing_table(union acpi_operand_object *package_object, | |||
292 | /* 1) First subobject: Dereference the PRT.Address */ | 292 | /* 1) First subobject: Dereference the PRT.Address */ |
293 | 293 | ||
294 | obj_desc = sub_object_list[0]; | 294 | obj_desc = sub_object_list[0]; |
295 | if (obj_desc->common.type != ACPI_TYPE_INTEGER) { | 295 | if (!obj_desc || obj_desc->common.type != ACPI_TYPE_INTEGER) { |
296 | ACPI_ERROR((AE_INFO, | 296 | ACPI_ERROR((AE_INFO, |
297 | "(PRT[%u].Address) Need Integer, found %s", | 297 | "(PRT[%u].Address) Need Integer, found %s", |
298 | index, | 298 | index, |
@@ -305,7 +305,7 @@ acpi_rs_create_pci_routing_table(union acpi_operand_object *package_object, | |||
305 | /* 2) Second subobject: Dereference the PRT.Pin */ | 305 | /* 2) Second subobject: Dereference the PRT.Pin */ |
306 | 306 | ||
307 | obj_desc = sub_object_list[1]; | 307 | obj_desc = sub_object_list[1]; |
308 | if (obj_desc->common.type != ACPI_TYPE_INTEGER) { | 308 | if (!obj_desc || obj_desc->common.type != ACPI_TYPE_INTEGER) { |
309 | ACPI_ERROR((AE_INFO, | 309 | ACPI_ERROR((AE_INFO, |
310 | "(PRT[%u].Pin) Need Integer, found %s", | 310 | "(PRT[%u].Pin) Need Integer, found %s", |
311 | index, | 311 | index, |
@@ -394,7 +394,7 @@ acpi_rs_create_pci_routing_table(union acpi_operand_object *package_object, | |||
394 | /* 4) Fourth subobject: Dereference the PRT.source_index */ | 394 | /* 4) Fourth subobject: Dereference the PRT.source_index */ |
395 | 395 | ||
396 | obj_desc = sub_object_list[3]; | 396 | obj_desc = sub_object_list[3]; |
397 | if (obj_desc->common.type != ACPI_TYPE_INTEGER) { | 397 | if (!obj_desc || obj_desc->common.type != ACPI_TYPE_INTEGER) { |
398 | ACPI_ERROR((AE_INFO, | 398 | ACPI_ERROR((AE_INFO, |
399 | "(PRT[%u].SourceIndex) Need Integer, found %s", | 399 | "(PRT[%u].SourceIndex) Need Integer, found %s", |
400 | index, | 400 | index, |