]> Git Repo - J-linux.git/commitdiff
tracing: Fix NULL vs IS_ERR() check in enable_instances()
authorDan Carpenter <[email protected]>
Thu, 20 Jun 2024 08:49:57 +0000 (11:49 +0300)
committerSteven Rostedt (Google) <[email protected]>
Mon, 15 Jul 2024 18:55:02 +0000 (14:55 -0400)
The trace_array_create_systems() function returns error pointers, not
NULL.  Fix the check to match.

Cc: Masami Hiramatsu <[email protected]>
Cc: Mathieu Desnoyers <[email protected]>
Fixes: e645535a954a ("tracing: Add option to use memmapped memory for trace boot instance")
Link: https://lore.kernel.org/[email protected]
Signed-off-by: Dan Carpenter <[email protected]>
Signed-off-by: Steven Rostedt (Google) <[email protected]>
kernel/trace/trace.c

index 71cca10581d6cd8a92192d23805a964804d28c24..5462fb10ff64b154d9afb43a1551fcf53a445867 100644 (file)
@@ -10507,7 +10507,7 @@ __init static void enable_instances(void)
                }
 
                tr = trace_array_create_systems(name, NULL, addr, size);
-               if (!tr) {
+               if (IS_ERR(tr)) {
                        pr_warn("Tracing: Failed to create instance buffer %s\n", curr_str);
                        continue;
                }
This page took 0.062003 seconds and 4 git commands to generate.