The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Cc: ssantosh@kernel.org, mturquette@baylibre.com,
	sboyd@codeaurora.org, linux-clk@vger.kernel.org,
	linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [PATCH] clk: keystone: Fix an error checking
Date: Mon, 24 Oct 2016 13:36:14 +0300	[thread overview]
Message-ID: <20161024103614.GW4469@mwanda> (raw)
In-Reply-To: <20161023081249.24668-1-christophe.jaillet@wanadoo.fr>

On Sun, Oct 23, 2016 at 10:12:49AM +0200, Christophe JAILLET wrote:
> clk_register_pll() can return ERR_PTR(-ENOMEM) so here the check against
> NULL only is not correct.
> 

Change the ERR_PTR(-ENOMEM) to a NULL instead.  When we mix error
pointers and NULL, what it means is that NULL should be treated as a
success case.  That's not the case here, so we should just return NULL
since we don't actually care about the error codes.

regards,
dan carpenter

  reply	other threads:[~2016-10-24 10:36 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-23  8:12 [PATCH] clk: keystone: Fix an error checking Christophe JAILLET
2016-10-24 10:36 ` Dan Carpenter [this message]
2016-10-24 10:41   ` Lars-Peter Clausen
2016-10-24 20:14     ` Christophe JAILLET

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=20161024103614.GW4469@mwanda \
    --to=dan.carpenter@oracle.com \
    --cc=christophe.jaillet@wanadoo.fr \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mturquette@baylibre.com \
    --cc=sboyd@codeaurora.org \
    --cc=ssantosh@kernel.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