regulator: core: Use IS_ERR_OR_NULL()
authorViresh Kumar <viresh.kumar@linaro.org>
Mon, 17 Aug 2015 07:00:58 +0000 (12:30 +0530)
committerMark Brown <broonie@kernel.org>
Mon, 17 Aug 2015 20:05:29 +0000 (13:05 -0700)
Use IS_ERR_OR_NULL() rather than open coding it.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/regulator/core.c

index 999a94b9735e0a9a7770134b4c1b600eab580257..5d61eb8f2a79aaf1c0a8250806ee9967c3154384 100644 (file)
@@ -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);