Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0f94bffa authored by Julia Lawall's avatar Julia Lawall Committed by Mark Brown
Browse files

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: default avatarJulia Lawall <julia.lawall@lip6.fr>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent e92a4047
Loading
Loading
Loading
Loading
+1 −5
Original line number Original line Diff line number Diff line
@@ -710,12 +710,8 @@ static int spmi_regulator_ult_lo_smps_set_voltage(struct regulator_dev *rdev,
	if (range_sel == 1)
	if (range_sel == 1)
		voltage_sel |= ULT_SMPS_RANGE_SPLIT;
		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);
	       voltage_sel, 0xff);
	if (ret)
		return ret;

	return 0;
}
}


static int spmi_regulator_ult_lo_smps_get_voltage(struct regulator_dev *rdev)
static int spmi_regulator_ult_lo_smps_get_voltage(struct regulator_dev *rdev)