aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/acpica/rscalc.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/acpi/acpica/rscalc.c')
-rw-r--r--drivers/acpi/acpica/rscalc.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/drivers/acpi/acpica/rscalc.c b/drivers/acpi/acpica/rscalc.c
index de12469d1c9c..147feb6aa2a0 100644
--- a/drivers/acpi/acpica/rscalc.c
+++ b/drivers/acpi/acpica/rscalc.c
@@ -457,6 +457,15 @@ acpi_rs_get_list_length(u8 * aml_buffer,
457 * Get the number of vendor data bytes 457 * Get the number of vendor data bytes
458 */ 458 */
459 extra_struct_bytes = resource_length; 459 extra_struct_bytes = resource_length;
460
461 /*
462 * There is already one byte included in the minimum
463 * descriptor size. If there are extra struct bytes,
464 * subtract one from the count.
465 */
466 if (extra_struct_bytes) {
467 extra_struct_bytes--;
468 }
460 break; 469 break;
461 470
462 case ACPI_RESOURCE_NAME_END_TAG: 471 case ACPI_RESOURCE_NAME_END_TAG:
@@ -601,7 +610,7 @@ acpi_rs_get_pci_routing_table_length(union acpi_operand_object *package_object,
601 /* 610 /*
602 * Calculate the size of the return buffer. 611 * Calculate the size of the return buffer.
603 * The base size is the number of elements * the sizes of the 612 * The base size is the number of elements * the sizes of the
604 * structures. Additional space for the strings is added below. 613 * structures. Additional space for the strings is added below.
605 * The minus one is to subtract the size of the u8 Source[1] 614 * The minus one is to subtract the size of the u8 Source[1]
606 * member because it is added below. 615 * member because it is added below.
607 * 616 *
@@ -664,8 +673,7 @@ acpi_rs_get_pci_routing_table_length(union acpi_operand_object *package_object,
664 (*sub_object_list)->string. 673 (*sub_object_list)->string.
665 length + 1); 674 length + 1);
666 } else { 675 } else {
667 temp_size_needed += 676 temp_size_needed += acpi_ns_get_pathname_length((*sub_object_list)->reference.node);
668 acpi_ns_get_pathname_length((*sub_object_list)->reference.node);
669 } 677 }
670 } else { 678 } else {
671 /* 679 /*