diff options
Diffstat (limited to 'drivers/regulator')
-rw-r--r-- | drivers/regulator/core.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c index edfa2230d475..a51e1e5fdff3 100644 --- a/drivers/regulator/core.c +++ b/drivers/regulator/core.c | |||
@@ -3477,7 +3477,14 @@ regulator_register(const struct regulator_desc *regulator_desc, | |||
3477 | 3477 | ||
3478 | r = regulator_dev_lookup(dev, supply, &ret); | 3478 | r = regulator_dev_lookup(dev, supply, &ret); |
3479 | 3479 | ||
3480 | if (!r) { | 3480 | if (ret == -ENODEV) { |
3481 | /* | ||
3482 | * No supply was specified for this regulator and | ||
3483 | * there will never be one. | ||
3484 | */ | ||
3485 | ret = 0; | ||
3486 | goto add_dev; | ||
3487 | } else if (!r) { | ||
3481 | dev_err(dev, "Failed to find supply %s\n", supply); | 3488 | dev_err(dev, "Failed to find supply %s\n", supply); |
3482 | ret = -EPROBE_DEFER; | 3489 | ret = -EPROBE_DEFER; |
3483 | goto scrub; | 3490 | goto scrub; |
@@ -3495,6 +3502,7 @@ regulator_register(const struct regulator_desc *regulator_desc, | |||
3495 | } | 3502 | } |
3496 | } | 3503 | } |
3497 | 3504 | ||
3505 | add_dev: | ||
3498 | /* add consumers devices */ | 3506 | /* add consumers devices */ |
3499 | if (init_data) { | 3507 | if (init_data) { |
3500 | for (i = 0; i < init_data->num_consumer_supplies; i++) { | 3508 | for (i = 0; i < init_data->num_consumer_supplies; i++) { |