Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 365126
b: refs/heads/master
c: 1e4b545
h: refs/heads/master
v: v3
  • Loading branch information
Nishanth Menon authored and Mark Brown committed Apr 17, 2013
1 parent c20f7c2 commit 327e58d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 0f7b87f0acc04e4f22ec5d3f2283a80993ca3aa8
refs/heads/master: 1e4b545cdd93318379c6b1fb0a99536fa3260f53
11 changes: 10 additions & 1 deletion trunk/drivers/regulator/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -1229,7 +1229,7 @@ static struct regulator *_regulator_get(struct device *dev, const char *id,
struct regulator_dev *rdev;
struct regulator *regulator = ERR_PTR(-EPROBE_DEFER);
const char *devname = NULL;
int ret;
int ret = 0;

if (id == NULL) {
pr_err("get() with no identifier\n");
Expand All @@ -1245,6 +1245,15 @@ static struct regulator *_regulator_get(struct device *dev, const char *id,
if (rdev)
goto found;

/*
* If we have return value from dev_lookup fail, we do not expect to
* succeed, so, quit with appropriate error value
*/
if (ret) {
regulator = ERR_PTR(ret);
goto out;
}

if (board_wants_dummy_regulator) {
rdev = dummy_regulator_rdev;
goto found;
Expand Down

0 comments on commit 327e58d

Please sign in to comment.