diff options
| author | Tirupathi Reddy <tirupath@codeaurora.org> | 2017-10-26 19:28:17 +0530 |
|---|---|---|
| committer | Tirupathi Reddy <tirupath@codeaurora.org> | 2017-11-02 09:36:36 +0530 |
| commit | be462176dfe7d265e37ccfabd87cfa0ff7bc941a (patch) | |
| tree | 39505b638d3f1f4cff0b9697e6d3d8c55ff1cf3a | |
| parent | aedf62a2ba4143939439ecacee412358ccd6fea2 (diff) | |
regulator: qpnp: fix voltage min/max constraints check
Fix voltage range selection logic used for voltage min/max
constraints check.
CRs-Fixed: 2136747
Change-Id: I80ab9ca583fda625ae2d9bd9e0c176a4b8c343db
Signed-off-by: Tirupathi Reddy <tirupath@codeaurora.org>
| -rw-r--r-- | drivers/regulator/qpnp-regulator.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/regulator/qpnp-regulator.c b/drivers/regulator/qpnp-regulator.c index 08e991fa7db3..4098cb91f8fb 100644 --- a/drivers/regulator/qpnp-regulator.c +++ b/drivers/regulator/qpnp-regulator.c @@ -1771,7 +1771,7 @@ static int qpnp_regulator_check_constraints(struct qpnp_regulator *vreg, if (vreg->logical_type == QPNP_REGULATOR_LOGICAL_TYPE_FTSMPS) { max_uV = pdata->init_data.constraints.max_uV; /* Find the range which max_uV is inside of. */ - for (i = vreg->set_points->count - 1; i > 0; i--) { + for (i = vreg->set_points->count - 1; i >= 0; i--) { range = &vreg->set_points->range[i]; if (range->set_point_max_uV > 0 && max_uV >= range->set_point_min_uV |
