Commit 9b2dfee3 authored by Stephen Boyd's avatar Stephen Boyd Committed by Mark Brown

regulator: qcom_spmi: Add missing braces for aligned code

drivers/regulator/qcom_spmi-regulator.c:751:3-50: code aligned
with following code on line 753
drivers/regulator/qcom_spmi-regulator.c:584:3-41: code aligned
with following code on line 587

These lines where missing braces causing the break to always
be executed even when it shouldn't be. Fix it.
Reported-by: default avatarkbuild test robot <fengguang.wu@intel.com>
Signed-off-by: default avatarStephen Boyd <sboyd@codeaurora.org>
Reviewed-by: default avatarAndy Gross <agross@codeaurora.org>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 0f94bffa
......@@ -580,11 +580,12 @@ static int spmi_regulator_select_voltage_same_range(struct spmi_regulator *vreg,
*selector = 0;
for (i = 0; i < vreg->set_points->count; i++) {
if (uV >= vreg->set_points->range[i].set_point_min_uV
&& uV <= vreg->set_points->range[i].set_point_max_uV)
&& uV <= vreg->set_points->range[i].set_point_max_uV) {
*selector +=
(uV - vreg->set_points->range[i].set_point_min_uV)
/ vreg->set_points->range[i].step_uV;
break;
}
*selector += vreg->set_points->range[i].n_voltages;
}
......@@ -743,10 +744,11 @@ static int spmi_regulator_common_list_voltage(struct regulator_dev *rdev,
return 0;
for (i = 0; i < vreg->set_points->count; i++) {
if (selector < vreg->set_points->range[i].n_voltages)
if (selector < vreg->set_points->range[i].n_voltages) {
uV = selector * vreg->set_points->range[i].step_uV
+ vreg->set_points->range[i].set_point_min_uV;
break;
}
selector -= vreg->set_points->range[i].n_voltages;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment