[PATCH] regulator: core: Use IS_ERR_OR_NULL()

From: Viresh Kumar
Date: Mon Aug 17 2015 - 03:00:58 EST


Use IS_ERR_OR_NULL() rather than open coding it.

Signed-off-by: Viresh Kumar <viresh.kumar@xxxxxxxxxx>
Signed-off-by: Mark Brown <broonie@xxxxxxxxxx>
---
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 999a94b..5d61eb8 100644
--- a/drivers/regulator/core.c
+++ b/drivers/regulator/core.c
@@ -1588,7 +1588,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;

lockdep_assert_held_once(&regulator_list_mutex);
--
2.5.0

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