summaryrefslogtreecommitdiffstats
path: root/drivers/regulator
diff options
context:
space:
mode:
authorJulia Lawall <julia.lawall@lip6.fr>2015-06-16 15:45:14 +0200
committerMark Brown <broonie@kernel.org>2015-06-16 16:58:53 +0200
commit0f94bffad401faa045c2062f1652d21e3e89f439 (patch)
tree7420b2da5ae1372389c8339f0b221703871486d5 /drivers/regulator
parentregulator: Add QCOM SPMI regulator driver (diff)
downloadlinux-0f94bffad401faa045c2062f1652d21e3e89f439.tar.xz
linux-0f94bffad401faa045c2062f1652d21e3e89f439.zip
regulator: fix simple_return.cocci warnings
Simplify a trivial if-return sequence and combine with a preceding function call. Generated by: scripts/coccinelle/misc/simple_return.cocci CC: Mark Brown <broonie@kernel.org> Signed-off-by: Julia Lawall <julia.lawall@lip6.fr> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/regulator')
-rw-r--r--drivers/regulator/qcom_spmi-regulator.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/regulator/qcom_spmi-regulator.c b/drivers/regulator/qcom_spmi-regulator.c
index 162b86501a91..15bba2b4ef70 100644
--- a/drivers/regulator/qcom_spmi-regulator.c
+++ b/drivers/regulator/qcom_spmi-regulator.c
@@ -710,12 +710,8 @@ static int spmi_regulator_ult_lo_smps_set_voltage(struct regulator_dev *rdev,
if (range_sel == 1)
voltage_sel |= ULT_SMPS_RANGE_SPLIT;
- ret = spmi_vreg_update_bits(vreg, SPMI_COMMON_REG_VOLTAGE_SET,
+ return spmi_vreg_update_bits(vreg, SPMI_COMMON_REG_VOLTAGE_SET,
voltage_sel, 0xff);
- if (ret)
- return ret;
-
- return 0;
}
static int spmi_regulator_ult_lo_smps_get_voltage(struct regulator_dev *rdev)