Commit 532f49a6 authored by Dan Carpenter's avatar Dan Carpenter Committed by Steven Rostedt (VMware)

tracing/boot: Fix an IS_ERR() vs NULL bug

The trace_array_get_by_name() function doesn't return error pointers,
it returns NULL on error.

Link: http://lkml.kernel.org/r/20200117053007.5h2juv272pokqhtq@kili.mountain

Fixes: 4f712a4d ("tracing/boot: Add instance node support")
Acked-by: default avatarMasami Hiramatsu <mhiramat@kernel.org>
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarSteven Rostedt (VMware) <rostedt@goodmis.org>
parent 14159720
...@@ -322,7 +322,7 @@ trace_boot_init_instances(struct xbc_node *node) ...@@ -322,7 +322,7 @@ trace_boot_init_instances(struct xbc_node *node)
continue; continue;
tr = trace_array_get_by_name(p); tr = trace_array_get_by_name(p);
if (IS_ERR(tr)) { if (!tr) {
pr_err("Failed to get trace instance %s\n", p); pr_err("Failed to get trace instance %s\n", p);
continue; continue;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment