diff options
-rw-r--r-- | drivers/regulator/core.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c index 7584a74eec8a..09a737c868b5 100644 --- a/drivers/regulator/core.c +++ b/drivers/regulator/core.c | |||
@@ -2050,6 +2050,9 @@ int regulator_map_voltage_linear(struct regulator_dev *rdev, | |||
2050 | return -EINVAL; | 2050 | return -EINVAL; |
2051 | } | 2051 | } |
2052 | 2052 | ||
2053 | if (min_uV < rdev->desc->min_uV) | ||
2054 | min_uV = rdev->desc->min_uV; | ||
2055 | |||
2053 | ret = DIV_ROUND_UP(min_uV - rdev->desc->min_uV, rdev->desc->uV_step); | 2056 | ret = DIV_ROUND_UP(min_uV - rdev->desc->min_uV, rdev->desc->uV_step); |
2054 | if (ret < 0) | 2057 | if (ret < 0) |
2055 | return ret; | 2058 | return ret; |