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: 4f712a4d04 ("tracing/boot: Add instance node support")
Acked-by: Masami Hiramatsu <mhiramat@kernel.org>
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
This commit is contained in:
Dan Carpenter 2020-01-17 08:30:07 +03:00 committed by Steven Rostedt (VMware)
parent 141597204e
commit 532f49a6f1

View File

@ -322,7 +322,7 @@ trace_boot_init_instances(struct xbc_node *node)
continue;
tr = trace_array_get_by_name(p);
if (IS_ERR(tr)) {
if (!tr) {
pr_err("Failed to get trace instance %s\n", p);
continue;
}