Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 83130649 authored by Lv Zheng's avatar Lv Zheng Committed by Rafael J. Wysocki
Browse files

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: default avatarLv Zheng <lv.zheng@intel.com>
Signed-off-by: default avatarBob Moore <robert.moore@intel.com>
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
parent 9ad4caf3
Loading
Loading
Loading
Loading
+3 −3
Original line number Original line Diff line number Diff line
@@ -292,7 +292,7 @@ acpi_rs_create_pci_routing_table(union acpi_operand_object *package_object,
		/* 1) First subobject: Dereference the PRT.Address */
		/* 1) First subobject: Dereference the PRT.Address */


		obj_desc = sub_object_list[0];
		obj_desc = sub_object_list[0];
		if (obj_desc->common.type != ACPI_TYPE_INTEGER) {
		if (!obj_desc || obj_desc->common.type != ACPI_TYPE_INTEGER) {
			ACPI_ERROR((AE_INFO,
			ACPI_ERROR((AE_INFO,
				    "(PRT[%u].Address) Need Integer, found %s",
				    "(PRT[%u].Address) Need Integer, found %s",
				    index,
				    index,
@@ -305,7 +305,7 @@ acpi_rs_create_pci_routing_table(union acpi_operand_object *package_object,
		/* 2) Second subobject: Dereference the PRT.Pin */
		/* 2) Second subobject: Dereference the PRT.Pin */


		obj_desc = sub_object_list[1];
		obj_desc = sub_object_list[1];
		if (obj_desc->common.type != ACPI_TYPE_INTEGER) {
		if (!obj_desc || obj_desc->common.type != ACPI_TYPE_INTEGER) {
			ACPI_ERROR((AE_INFO,
			ACPI_ERROR((AE_INFO,
				    "(PRT[%u].Pin) Need Integer, found %s",
				    "(PRT[%u].Pin) Need Integer, found %s",
				    index,
				    index,
@@ -394,7 +394,7 @@ acpi_rs_create_pci_routing_table(union acpi_operand_object *package_object,
		/* 4) Fourth subobject: Dereference the PRT.source_index */
		/* 4) Fourth subobject: Dereference the PRT.source_index */


		obj_desc = sub_object_list[3];
		obj_desc = sub_object_list[3];
		if (obj_desc->common.type != ACPI_TYPE_INTEGER) {
		if (!obj_desc || obj_desc->common.type != ACPI_TYPE_INTEGER) {
			ACPI_ERROR((AE_INFO,
			ACPI_ERROR((AE_INFO,
				    "(PRT[%u].SourceIndex) Need Integer, found %s",
				    "(PRT[%u].SourceIndex) Need Integer, found %s",
				    index,
				    index,