public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Tom Zanussi <tom.zanussi@linux.intel.com>
To: Dan Carpenter <dan.carpenter@oracle.com>,
	Steven Rostedt <rostedt@goodmis.org>
Cc: Ingo Molnar <mingo@redhat.com>,
	linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [patch] tracing: checking for NULL instead of IS_ERR()
Date: Mon, 25 Apr 2016 13:59:32 -0500	[thread overview]
Message-ID: <571E6914.90708@linux.intel.com> (raw)
In-Reply-To: <20160423102347.GA11136@mwanda>

Hi Dan,

On 04/23/2016 05:23 AM, Dan Carpenter wrote:
> tracing_map_elt_alloc() returns ERR_PTRs on error, never NULL.
>
> Fixes: 08d43a5fa063 ('tracing: Add lock-free tracing_map')
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
>
> diff --git a/kernel/trace/tracing_map.c b/kernel/trace/tracing_map.c
> index e0f1729..e7dfc5e 100644
> --- a/kernel/trace/tracing_map.c
> +++ b/kernel/trace/tracing_map.c
> @@ -814,7 +814,7 @@ static struct tracing_map_elt *copy_elt(struct tracing_map_elt *elt)
>   	unsigned int i;
>
>   	dup_elt = tracing_map_elt_alloc(elt->map);
> -	if (!dup_elt)
> +	if (IS_ERR(dup_elt))
>   		return NULL;
>
>   	if (elt->map->ops && elt->map->ops->elt_copy)
>

Thanks for fixing this.  I found another one along the same lines which 
I'll send a patch for shortly.

Acked-by: Tom Zanussi <tom.zanussi@linux.intel.com>

  reply	other threads:[~2016-04-25 18:59 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-23 10:23 [patch] tracing: checking for NULL instead of IS_ERR() Dan Carpenter
2016-04-25 18:59 ` Tom Zanussi [this message]
2016-04-26 13:41   ` Steven Rostedt

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=571E6914.90708@linux.intel.com \
    --to=tom.zanussi@linux.intel.com \
    --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