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;