|
|
@@ -6822,12 +6822,15 @@ static int ufshcd_config_vreg(struct device *dev,
|
|
|
name = vreg->name;
|
|
|
|
|
|
if (regulator_count_voltages(reg) > 0) {
|
|
|
- min_uV = on ? vreg->min_uV : 0;
|
|
|
- ret = regulator_set_voltage(reg, min_uV, vreg->max_uV);
|
|
|
- if (ret) {
|
|
|
- dev_err(dev, "%s: %s set voltage failed, err=%d\n",
|
|
|
+ if (vreg->min_uV && vreg->max_uV) {
|
|
|
+ min_uV = on ? vreg->min_uV : 0;
|
|
|
+ ret = regulator_set_voltage(reg, min_uV, vreg->max_uV);
|
|
|
+ if (ret) {
|
|
|
+ dev_err(dev,
|
|
|
+ "%s: %s set voltage failed, err=%d\n",
|
|
|
__func__, name, ret);
|
|
|
- goto out;
|
|
|
+ goto out;
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
uA_load = on ? vreg->max_uA : 0;
|