ACPICA: AML Debug Object: Don't ignore output of zero-length strings
authorBob Moore <robert.moore@intel.com>
Wed, 14 Mar 2018 23:13:02 +0000 (16:13 -0700)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Sun, 18 Mar 2018 17:52:00 +0000 (18:52 +0100)
The implementation previously ignored null strings (""), but
these could be important, especially for debug.

Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Erik Schmauss <erik.schmauss@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/acpi/acpica/exdebug.c

index d931a66a16e3c423fc0dff29e0106637ecd385e5..f3e024182a56295d85a8eea65b092c331712cd33 100644 (file)
@@ -88,14 +88,13 @@ acpi_ex_do_debug_object(union acpi_operand_object *source_desc,
                return_VOID;
        }
 
-       /* Null string or newline -- don't emit the line header */
+       /* Newline -- don't emit the line header */
 
        if (source_desc &&
            (ACPI_GET_DESCRIPTOR_TYPE(source_desc) == ACPI_DESC_TYPE_OPERAND) &&
            (source_desc->common.type == ACPI_TYPE_STRING)) {
-               if ((source_desc->string.length == 0) ||
-                   ((source_desc->string.length == 1) &&
-                    (*source_desc->string.pointer == '\n'))) {
+               if ((source_desc->string.length == 1) &&
+                   (*source_desc->string.pointer == '\n')) {
                        acpi_os_printf("\n");
                        return_VOID;
                }