public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] regulator: core: Use IS_ERR_OR_NULL()
@ 2015-08-17  7:00 Viresh Kumar
  2015-08-17 20:06 ` Mark Brown
  2015-08-20 13:26 ` Arnd Bergmann
  0 siblings, 2 replies; 5+ messages in thread
From: Viresh Kumar @ 2015-08-17  7:00 UTC (permalink / raw)
  To: broonie
  Cc: linaro-kernel, Viresh Kumar, Liam Girdwood,
	open list:VOLTAGE AND CURRENT REGULATOR FRAMEWORK

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


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-08-20 15:53 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox