Skip to content

Commit 94dfa50

Browse files
Dan Carpenterrostedt
authored andcommitted
tracing: Fix NULL vs IS_ERR() check in enable_instances()
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: e645535 ("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]>
1 parent a62b4f6 commit 94dfa50

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

kernel/trace/trace.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10507,7 +10507,7 @@ __init static void enable_instances(void)
1050710507
}
1050810508

1050910509
tr = trace_array_create_systems(name, NULL, addr, size);
10510-
if (!tr) {
10510+
if (IS_ERR(tr)) {
1051110511
pr_warn("Tracing: Failed to create instance buffer %s\n", curr_str);
1051210512
continue;
1051310513
}

0 commit comments

Comments
 (0)