summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFeng Tang <feng.tang@intel.com>2012-10-31 02:27:15 +0000
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2012-11-15 00:31:26 +0100
commitbee6dc39cfa4be083e8c11cee0867eb7dc56895b (patch)
tree9a6b80801cce89c99ed2ef1ce5a9d0be259138ba
parentabf95c362929ce0af7dd413f981597c5386f749d (diff)
downloadlinux-3.10-bee6dc39cfa4be083e8c11cee0867eb7dc56895b.tar.gz
linux-3.10-bee6dc39cfa4be083e8c11cee0867eb7dc56895b.tar.bz2
linux-3.10-bee6dc39cfa4be083e8c11cee0867eb7dc56895b.zip
ACPICA: Resource Mgr: Small fix for buffer size calculation
Fixes a one byte error in the output buffer calculation. Feng Tang - ACPICA BZ 849: https://www.acpica.org/bugzilla/show_bug.cgi?id=849 Signed-off-by: Feng Tang <feng.tang@intel.com> Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lv Zheng <lv.zheng@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
-rw-r--r--drivers/acpi/acpica/rscalc.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/acpi/acpica/rscalc.c b/drivers/acpi/acpica/rscalc.c
index 68517798550..147feb6aa2a 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,
* Get the number of vendor data bytes
*/
extra_struct_bytes = resource_length;
+
+ /*
+ * There is already one byte included in the minimum
+ * descriptor size. If there are extra struct bytes,
+ * subtract one from the count.
+ */
+ if (extra_struct_bytes) {
+ extra_struct_bytes--;
+ }
break;
case ACPI_RESOURCE_NAME_END_TAG: