[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200124151725.996608776@goodmis.org>
Date: Fri, 24 Jan 2020 10:17:03 -0500
From: Steven Rostedt <rostedt@...dmis.org>
To: linux-kernel@...r.kernel.org
Cc: Ingo Molnar <mingo@...nel.org>,
Andrew Morton <akpm@...ux-foundation.org>,
Masami Hiramatsu <mhiramat@...nel.org>,
Dan Carpenter <dan.carpenter@...cle.com>
Subject: [for-next][PATCH 12/14] tracing/boot: Fix an IS_ERR() vs NULL bug
From: Dan Carpenter <dan.carpenter@...cle.com>
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@...nel.org>
Signed-off-by: Dan Carpenter <dan.carpenter@...cle.com>
Signed-off-by: Steven Rostedt (VMware) <rostedt@...dmis.org>
---
kernel/trace/trace_boot.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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;
}
--
2.24.1
Powered by blists - more mailing lists