Merge "regulator: qpnp: fix voltage min/max constraints check"

This commit is contained in:
Linux Build Service Account 2017-11-08 12:55:14 -08:00 committed by Gerrit - the friendly Code Review server
commit b9d7765e73

View file

@ -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