diff options
-rw-r--r-- | drivers/regulator/core.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c index 088b41ac9506..a40055edaae4 100644 --- a/drivers/regulator/core.c +++ b/drivers/regulator/core.c | |||
@@ -1263,12 +1263,13 @@ static struct regulator *_regulator_get(struct device *dev, const char *id, | |||
1263 | if (rdev) | 1263 | if (rdev) |
1264 | goto found; | 1264 | goto found; |
1265 | 1265 | ||
1266 | regulator = ERR_PTR(ret); | ||
1267 | |||
1266 | /* | 1268 | /* |
1267 | * If we have return value from dev_lookup fail, we do not expect to | 1269 | * If we have return value from dev_lookup fail, we do not expect to |
1268 | * succeed, so, quit with appropriate error value | 1270 | * succeed, so, quit with appropriate error value |
1269 | */ | 1271 | */ |
1270 | if (ret && ret != -ENODEV) { | 1272 | if (ret && ret != -ENODEV) { |
1271 | regulator = ERR_PTR(ret); | ||
1272 | goto out; | 1273 | goto out; |
1273 | } | 1274 | } |
1274 | 1275 | ||