diff options
author | Bob Moore <robert.moore@intel.com> | 2015-12-29 09:04:11 +0300 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2016-01-01 05:47:38 +0300 |
commit | 2247235379d9e9fa46f725a82e0c05ae96254007 (patch) | |
tree | f7cece6ef92c65a7161278e464e1b11bd4cd0935 | |
parent | d815346f7675e056d904fb3aad5a347e0bb58410 (diff) | |
download | linux-2247235379d9e9fa46f725a82e0c05ae96254007.tar.xz |
ACPICA: Add "root node" case to the ACPI name repair code
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>
-rw-r--r-- | drivers/acpi/acpica/utstring.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/acpi/acpica/utstring.c b/drivers/acpi/acpica/utstring.c index 0c2e2d23aa8d..958b2f7b552d 100644 --- a/drivers/acpi/acpica/utstring.c +++ b/drivers/acpi/acpica/utstring.c @@ -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 */ |