public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Viresh Kumar <viresh.kumar@linaro.org>
To: Arnd Bergmann <arnd@arndb.de>
Cc: linaro-kernel@lists.linaro.org, broonie@kernel.org,
	Liam Girdwood <lgirdwood@gmail.com>,
	"open list:VOLTAGE AND CURRENT REGULATOR FRAMEWORK" 
	<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] regulator: core: Use IS_ERR_OR_NULL()
Date: Thu, 20 Aug 2015 21:22:57 +0530	[thread overview]
Message-ID: <20150820155257.GB4159@linux> (raw)
In-Reply-To: <1600359.hvYhnkmyof@wuerfel>

On 20-08-15, 15:26, Arnd Bergmann wrote:
> The use of IS_ERR_OR_NULL is almost always a bug (as is the open-coded
> equivalent).
> Please try to find out why this is done here and add a comment
> if it's actually correct, or fix it if not.
> 
> My guess is that it is not ok to pass an error pointer as the argument
> of _regulator_put(), so maybe there should be WARN_ON()?

I agree, but updating that would require a revisit of all the API
users, in case they are passing a possible error value to it.

I am fine at attempting to fix that, but would need an Ack from Mark
first.

-- 
viresh

      reply	other threads:[~2015-08-20 15:53 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-17  7:00 [PATCH] regulator: core: Use IS_ERR_OR_NULL() Viresh Kumar
2015-08-17 20:06 ` Mark Brown
2015-08-18  2:30   ` Viresh Kumar
2015-08-20 13:26 ` Arnd Bergmann
2015-08-20 15:52   ` Viresh Kumar [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=20150820155257.GB4159@linux \
    --to=viresh.kumar@linaro.org \
    --cc=arnd@arndb.de \
    --cc=broonie@kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=linaro-kernel@lists.linaro.org \
    --cc=linux-kernel@vger.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