1

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 <mhiramat@kernel.org>
Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Fixes: e645535a95 ("tracing: Add option to use memmapped memory for trace boot instance")
Link: https://lore.kernel.org/9b23ea03-d709-435f-a309-461c3d747457@moroto.mountain
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
This commit is contained in:
Dan Carpenter 2024-06-20 11:49:57 +03:00 committed by Steven Rostedt (Google)
parent a62b4f6fbd
commit 94dfa500e7

View 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;
}