Skip to content

Commit

Permalink
ACPICA: Add "root node" case to the ACPI name repair code
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Bob Moore authored and Rafael J. Wysocki committed Jan 1, 2016
1 parent d815346 commit 2247235
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions drivers/acpi/acpica/utstring.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down

0 comments on commit 2247235

Please sign in to comment.