Commit 1f156b42 authored by Minghao Chi's avatar Minghao Chi Committed by Mark Brown

regulator: remove redundant ret variable

Return value from regmap_update_bits() directly instead
of taking this in another redundant variable.
Reported-by: default avatarZeal Robot <zealci@zte.com.cn>
Signed-off-by: default avatarMinghao Chi <chi.minghao@zte.com.cn>
Signed-off-by: default avatarCGEL ZTE <cgel.zte@gmail.com>
Link: https://lore.kernel.org/r/20220104104139.601031-1-chi.minghao@zte.com.cnSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent d27bb69d
...@@ -183,7 +183,7 @@ static const unsigned int ldo_volt_table4[] = { ...@@ -183,7 +183,7 @@ static const unsigned int ldo_volt_table4[] = {
static int mt6380_regulator_set_mode(struct regulator_dev *rdev, static int mt6380_regulator_set_mode(struct regulator_dev *rdev,
unsigned int mode) unsigned int mode)
{ {
int ret, val = 0; int val = 0;
struct mt6380_regulator_info *info = rdev_get_drvdata(rdev); struct mt6380_regulator_info *info = rdev_get_drvdata(rdev);
switch (mode) { switch (mode) {
...@@ -199,10 +199,8 @@ static int mt6380_regulator_set_mode(struct regulator_dev *rdev, ...@@ -199,10 +199,8 @@ static int mt6380_regulator_set_mode(struct regulator_dev *rdev,
val <<= ffs(info->modeset_mask) - 1; val <<= ffs(info->modeset_mask) - 1;
ret = regmap_update_bits(rdev->regmap, info->modeset_reg, return regmap_update_bits(rdev->regmap, info->modeset_reg,
info->modeset_mask, val); info->modeset_mask, val);
return ret;
} }
static unsigned int mt6380_regulator_get_mode(struct regulator_dev *rdev) static unsigned int mt6380_regulator_get_mode(struct regulator_dev *rdev)
......
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