diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2020-01-17 06:30:07 +0100 |
---|---|---|
committer | Steven Rostedt (VMware) <rostedt@goodmis.org> | 2020-01-22 00:41:39 +0100 |
commit | 532f49a6f19a153e202b5a174f8556fd50c36dd4 (patch) | |
tree | f89863de3acfde94b0fe4762ee8052592090f452 /kernel/trace/trace_boot.c | |
parent | tracing: Remove unused TRACE_SEQ_BUF_USED (diff) | |
download | linux-532f49a6f19a153e202b5a174f8556fd50c36dd4.tar.xz linux-532f49a6f19a153e202b5a174f8556fd50c36dd4.zip |
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: 4f712a4d04a4 ("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>
Diffstat (limited to 'kernel/trace/trace_boot.c')
-rw-r--r-- | kernel/trace/trace_boot.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/trace/trace_boot.c b/kernel/trace/trace_boot.c index fa9603dc6469..cd541ac1cbc1 100644 --- a/kernel/trace/trace_boot.c +++ b/kernel/trace/trace_boot.c @@ -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; } |