]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
ACPICA: Add "root node" case to the ACPI name repair code
authorBob Moore <robert.moore@intel.com>
Tue, 29 Dec 2015 06:04:11 +0000 (14:04 +0800)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Fri, 1 Jan 2016 02:47:38 +0000 (03:47 +0100)
ACPICA commit 95b40b31aa8148629fbe5de0356725fc01298003

Special-case the namespace root node, it has an unusual name.

This case can occur if there are errors during the execution
of module-level code.

Link: https://github.com/acpica/acpica/commit/95b40b31
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>
drivers/acpi/acpica/utstring.c

index 0c2e2d23aa8d18d5cafe30772928c32acff5c085..958b2f7b552d315a5b02f40f268dbf827b814380 100644 (file)
@@ -240,6 +240,14 @@ void acpi_ut_repair_name(char *name)
 
        ACPI_FUNCTION_NAME(ut_repair_name);
 
+       /*
+        * Special case for the root node. This can happen if we get an
+        * error during the execution of module-level code.
+        */
+       if (ACPI_COMPARE_NAME(name, "\\___")) {
+               return;
+       }
+
        ACPI_MOVE_NAME(&original_name, name);
 
        /* Check each character in the name */