diff options
Diffstat (limited to 'drivers/regulator/core.c')
-rw-r--r-- | drivers/regulator/core.c | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c index 18fa9206ec20..fd8582d7e2c0 100644 --- a/drivers/regulator/core.c +++ b/drivers/regulator/core.c @@ -979,10 +979,13 @@ static int drms_uA_update(struct regulator_dev *rdev) } else { /* get output voltage */ output_uV = regulator_get_voltage_rdev(rdev); - if (output_uV <= 0) { - rdev_err(rdev, "invalid output voltage found\n"); - return -EINVAL; - } + + /* + * Don't return an error; if regulator driver cares about + * output_uV then it's up to the driver to validate. + */ + if (output_uV <= 0) + rdev_dbg(rdev, "invalid output voltage found\n"); /* get input voltage */ input_uV = 0; @@ -990,10 +993,13 @@ static int drms_uA_update(struct regulator_dev *rdev) input_uV = regulator_get_voltage(rdev->supply); if (input_uV <= 0) input_uV = rdev->constraints->input_uV; - if (input_uV <= 0) { - rdev_err(rdev, "invalid input voltage found\n"); - return -EINVAL; - } + + /* + * Don't return an error; if regulator driver cares about + * input_uV then it's up to the driver to validate. + */ + if (input_uV <= 0) + rdev_dbg(rdev, "invalid input voltage found\n"); /* now get the optimum mode for our new total regulator load */ mode = rdev->desc->ops->get_optimum_mode(rdev, input_uV, |