summaryrefslogtreecommitdiff
path: root/drivers/regulator
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/regulator')
-rw-r--r--drivers/regulator/of_regulator.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/regulator/of_regulator.c b/drivers/regulator/of_regulator.c
index 584c92f1a317..f7529f1bf8b2 100644
--- a/drivers/regulator/of_regulator.c
+++ b/drivers/regulator/of_regulator.c
@@ -767,7 +767,7 @@ restart:
memcpy(name, prop->name, i);
name[i] = '\0';
tmp = regulator_get(dev, name);
- if (!tmp) {
+ if (IS_ERR(tmp)) {
ret = -EINVAL;
goto error;
}