Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1208408 > unrolled thread

[PATCH] regulator: core: Use IS_ERR_OR_NULL()

Started byViresh Kumar <viresh.kumar@linaro.org>
First post2015-08-17 09:10 +0200
Last post2015-08-18 04:40 +0200
Articles 3 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] regulator: core: Use IS_ERR_OR_NULL() Viresh Kumar <viresh.kumar@linaro.org> - 2015-08-17 09:10 +0200
    Re: [PATCH] regulator: core: Use IS_ERR_OR_NULL() Mark Brown <broonie@kernel.org> - 2015-08-17 22:10 +0200
      Re: [PATCH] regulator: core: Use IS_ERR_OR_NULL() Viresh Kumar <viresh.kumar@linaro.org> - 2015-08-18 04:40 +0200

#1208408 — [PATCH] regulator: core: Use IS_ERR_OR_NULL()

FromViresh Kumar <viresh.kumar@linaro.org>
Date2015-08-17 09:10 +0200
Subject[PATCH] regulator: core: Use IS_ERR_OR_NULL()
Message-ID<pYmIp-6B-11@gated-at.bofh.it>
Use IS_ERR_OR_NULL() rather than open coding it.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
 drivers/regulator/core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c
index 78387a6cbae5..55b49acfd9b3 100644
--- a/drivers/regulator/core.c
+++ b/drivers/regulator/core.c
@@ -1595,7 +1595,7 @@ static void _regulator_put(struct regulator *regulator)
 {
 	struct regulator_dev *rdev;
 
-	if (regulator == NULL || IS_ERR(regulator))
+	if (IS_ERR_OR_NULL(regulator))
 		return;
 
 	rdev = regulator->rdev;
-- 
2.4.0

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [next] | [standalone]


#1208856

FromMark Brown <broonie@kernel.org>
Date2015-08-17 22:10 +0200
Message-ID<pYyTf-Mb-19@gated-at.bofh.it>
In reply to#1208408

[Multipart message — attachments visible in raw view] — view raw

On Mon, Aug 17, 2015 at 12:30:58PM +0530, Viresh Kumar wrote:
> Use IS_ERR_OR_NULL() rather than open coding it.

Neither of the patches you sent today applied cleanly against current
code, please submit patches against the tree they're intended to be
applied on.

[toc] | [prev] | [next] | [standalone]


#1209008

FromViresh Kumar <viresh.kumar@linaro.org>
Date2015-08-18 04:40 +0200
Message-ID<pYEYG-1cr-7@gated-at.bofh.it>
In reply to#1208856
On 17-08-15, 13:06, Mark Brown wrote:
> On Mon, Aug 17, 2015 at 12:30:58PM +0530, Viresh Kumar wrote:
> > Use IS_ERR_OR_NULL() rather than open coding it.
> 
> Neither of the patches you sent today applied cleanly against current
> code, please submit patches against the tree they're intended to be
> applied on.

That's the last I wanted to get ranted about, Sigh.

I thought, my base is the latest linux-next/master, which will have
your latest updates. But that wasn't the case. I was sitting on a
slightly older base. Sorry about that.

Will base out of your tree directly in future.

-- 
viresh
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web