diff options
Diffstat (limited to 'drivers/regulator/core.c')
-rw-r--r-- | drivers/regulator/core.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c index da357a07c98..2ff76349f39 100644 --- a/drivers/regulator/core.c +++ b/drivers/regulator/core.c | |||
@@ -709,8 +709,12 @@ static int set_machine_constraints(struct regulator_dev *rdev, | |||
709 | cmax = INT_MAX; | 709 | cmax = INT_MAX; |
710 | } | 710 | } |
711 | 711 | ||
712 | /* voltage constraints are optional */ | ||
713 | if ((cmin == 0) && (cmax == 0)) | ||
714 | goto out; | ||
715 | |||
712 | /* else require explicit machine-level constraints */ | 716 | /* else require explicit machine-level constraints */ |
713 | else if (cmin <= 0 || cmax <= 0 || cmax < cmin) { | 717 | if (cmin <= 0 || cmax <= 0 || cmax < cmin) { |
714 | pr_err("%s: %s '%s' voltage constraints\n", | 718 | pr_err("%s: %s '%s' voltage constraints\n", |
715 | __func__, "invalid", name); | 719 | __func__, "invalid", name); |
716 | ret = -EINVAL; | 720 | ret = -EINVAL; |