Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

regulator: max597x: Remove the unneeded result variable

Return the value from regmap_write() directly instead of storing it
in another redundant variable.

Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: ye xingchen <ye.xingchen@zte.com.cn>
Link: https://lore.kernel.org/r/20220824074707.221159-1-ye.xingchen@zte.com.cn
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

ye xingchen and committed by
Mark Brown
48aa4730 d9270292

+2 -3
+2 -3
drivers/regulator/max597x-regulator.c
··· 137 137 static int max597x_set_ocp(struct regulator_dev *rdev, int lim_uA, 138 138 int severity, bool enable) 139 139 { 140 - int ret, val, reg; 140 + int val, reg; 141 141 unsigned int vthst, vthfst; 142 142 143 143 struct max597x_regulator *data = rdev_get_drvdata(rdev); ··· 183 183 val = 0xFF; 184 184 185 185 reg = MAX5970_REG_DAC_FAST(rdev_id); 186 - ret = regmap_write(rdev->regmap, reg, val); 187 186 188 - return ret; 187 + return regmap_write(rdev->regmap, reg, val); 189 188 } 190 189 191 190 static int max597x_get_status(struct regulator_dev *rdev)