ACPICA: Add a check for a null node during namespace walk.
authorBob Moore <robert.moore@intel.com>
Tue, 29 Oct 2013 01:29:04 +0000 (09:29 +0800)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Wed, 30 Oct 2013 11:24:20 +0000 (12:24 +0100)
Mostly for consistency. ACPICA BZ 1042.

Actually, currently no one is experiencing problem without this check
as the obj_handle is guaranteed to be valid.

References: https://bugs.acpica.org/show_bug.cgi?id=1042
Reported-by: Colin Ian King <colin.king@canonical.com>
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/nsdump.c

index 80633851cb2fd00e7886bdc4deacf0929726818a..c6348545277e91adea339455ceaac096de918df6 100644 (file)
@@ -715,6 +715,13 @@ acpi_ns_dump_one_object_path(acpi_handle obj_handle,
        }
 
        node = acpi_ns_validate_handle(obj_handle);
+       if (!node) {
+
+               /* Ignore bad node during namespace walk */
+
+               return (AE_OK);
+       }
+
        pathname = acpi_ns_get_external_pathname(node);
 
        path_indent = 1;