ACPICA: Debugger: Remove some unecessary NULL checks
authorMarkus Elfring <elfring@users.sourceforge.net>
Tue, 29 Dec 2015 05:55:27 +0000 (13:55 +0800)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Fri, 1 Jan 2016 02:47:35 +0000 (03:47 +0100)
ACPICA commit 36fcc1b98def3fb6e20cf5e877ffc3c1592d0140

Local strupr function already checks for NULL pointers.

Original linux patch submitted by:
Markus Elfring <elfring@users.sourceforge.net>

Link: https://github.com/acpica/acpica/commit/36fcc1b9
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
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/dbcmds.c
drivers/acpi/acpica/dbinput.c

index 84ab1c2faa0475adb9a84eebb43997b64300c82e..328c35b323d55f04ee0d5e7ceac5781a3c87ed42 100644 (file)
@@ -1131,13 +1131,8 @@ void acpi_db_trace(char *enable_arg, char *method_arg, char *once_arg)
        u32 debug_layer = 0;
        u32 flags = 0;
 
-       if (enable_arg) {
-               acpi_ut_strupr(enable_arg);
-       }
-
-       if (once_arg) {
-               acpi_ut_strupr(once_arg);
-       }
+       acpi_ut_strupr(enable_arg);
+       acpi_ut_strupr(once_arg);
 
        if (method_arg) {
                if (acpi_db_trace_method_name) {
index 802779a3d913377a49f69a7238b94f77351890b6..6203001baa301507a4e4b893138eca323307b613 100644 (file)
@@ -625,9 +625,7 @@ static u32 acpi_db_get_line(char *input_buffer)
 
        /* Uppercase the actual command */
 
-       if (acpi_gbl_db_args[0]) {
-               acpi_ut_strupr(acpi_gbl_db_args[0]);
-       }
+       acpi_ut_strupr(acpi_gbl_db_args[0]);
 
        count = i;
        if (count) {