From: Masami Hiramatsu <mhiramat@kernel.org>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: "Steven Rostedt (VMware)" <rostedt@goodmis.org>,
Ingo Molnar <mingo@redhat.com>,
linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [PATCH] tracing/boot: Fix an IS_ERR() vs NULL bug
Date: Sat, 18 Jan 2020 08:59:07 +0900 [thread overview]
Message-ID: <20200118085907.639cd8d683f961bb9310239d@kernel.org> (raw)
In-Reply-To: <20200117053007.5h2juv272pokqhtq@kili.mountain>
On Fri, 17 Jan 2020 08:30:07 +0300
Dan Carpenter <dan.carpenter@oracle.com> wrote:
> The trace_array_get_by_name() function doesn't return error pointers,
> it returns NULL on error.
Good catch! It used to use trace_array_create() which returns err_ptr,
but trace_array_get_by_name() doesn't anymore.
Acked-by: Masami Hiramatsu <mhiramat@kernel.org>
Thank you!
>
> Fixes: 4f712a4d04a4 ("tracing/boot: Add instance node support")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> ---
> 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.11.0
>
--
Masami Hiramatsu <mhiramat@kernel.org>
prev parent reply other threads:[~2020-01-17 23:59 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-17 5:30 Dan Carpenter
2020-01-17 23:59 ` Masami Hiramatsu [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200118085907.639cd8d683f961bb9310239d@kernel.org \
--to=mhiramat@kernel.org \
--cc=dan.carpenter@oracle.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=rostedt@goodmis.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®