summaryrefslogtreecommitdiff
path: root/drivers/acpi/acpica
diff options
context:
space:
mode:
authorErik Schmauss <erik.schmauss@intel.com>2019-10-25 14:36:59 -0700
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2019-10-28 22:12:46 +0100
commit45abdc9903e9eb75f754dd2faeaa1943b1df4806 (patch)
tree2531c22f6494c621a467a81e670c56d13683eb66 /drivers/acpi/acpica
parent02b04f10b83639c41dc338e4d43652cab49748fc (diff)
ACPICA: debugger: remove leading whitespaces when converting a string to a buffer
ACPICA commit 1b7228072f254a5b02625586ff7d561757b7fc2d By removing leading whitespaces, the conversion computes the correct number of elements in a given buffer or field encoding that contains leading whitespaces. Link: https://github.com/acpica/acpica/commit/1b722807 Signed-off-by: Erik Schmauss <erik.schmauss@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')
-rw-r--r--drivers/acpi/acpica/dbconvert.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/acpi/acpica/dbconvert.c b/drivers/acpi/acpica/dbconvert.c
index 9fd9a98a9cbe..2b84ac093698 100644
--- a/drivers/acpi/acpica/dbconvert.c
+++ b/drivers/acpi/acpica/dbconvert.c
@@ -106,6 +106,10 @@ acpi_db_convert_to_buffer(char *string, union acpi_object *object)
u8 *buffer;
acpi_status status;
+ /* Skip all preceding white space */
+
+ acpi_ut_remove_whitespace(&string);
+
/* Generate the final buffer length */
for (i = 0, length = 0; string[i];) {