diff options
author | Stephen Boyd <sboyd@codeaurora.org> | 2015-06-16 11:11:22 -0700 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2015-06-17 08:54:19 +0100 |
commit | 9b2dfee3954e0b38a6a1b5305edd375defa8ad97 (patch) | |
tree | 7ed50765931b1af90d10ed72daea9dfed61994e4 /drivers/regulator | |
parent | 0f94bffad401faa045c2062f1652d21e3e89f439 (diff) | |
download | talos-obmc-linux-9b2dfee3954e0b38a6a1b5305edd375defa8ad97.tar.gz talos-obmc-linux-9b2dfee3954e0b38a6a1b5305edd375defa8ad97.zip |
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: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Reviewed-by: Andy Gross <agross@codeaurora.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/regulator')
-rw-r--r-- | drivers/regulator/qcom_spmi-regulator.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/regulator/qcom_spmi-regulator.c b/drivers/regulator/qcom_spmi-regulator.c index 15bba2b4ef70..16a5c1885153 100644 --- a/drivers/regulator/qcom_spmi-regulator.c +++ b/drivers/regulator/qcom_spmi-regulator.c @@ -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; } |