Skip to content

Commit

Permalink
regulator: fix simple_return.cocci warnings
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Julia Lawall authored and Mark Brown committed Jun 16, 2015
1 parent e92a404 commit 0f94bff
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions drivers/regulator/qcom_spmi-regulator.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 0f94bff

Please sign in to comment.