projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d927029
)
regulator: max597x: Remove the unneeded result variable
author
ye xingchen
<ye.xingchen@zte.com.cn>
Wed, 24 Aug 2022 07:47:07 +0000
(07:47 +0000)
committer
Mark Brown
<broonie@kernel.org>
Wed, 24 Aug 2022 11:21:30 +0000
(12:21 +0100)
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>
drivers/regulator/max597x-regulator.c
patch
|
blob
|
history
diff --git
a/drivers/regulator/max597x-regulator.c
b/drivers/regulator/max597x-regulator.c
index 03c6027682d81b3c8451f3e6ef80e7c834afa727..39f803ff0a90a8f086aa247c2cb30db39d508a1f 100644
(file)
--- a/
drivers/regulator/max597x-regulator.c
+++ b/
drivers/regulator/max597x-regulator.c
@@
-137,7
+137,7
@@
static int max597x_set_ovp(struct regulator_dev *rdev, int lim_uV, int severity,
static int max597x_set_ocp(struct regulator_dev *rdev, int lim_uA,
int severity, bool enable)
{
- int
ret,
val, reg;
+ int val, reg;
unsigned int vthst, vthfst;
struct max597x_regulator *data = rdev_get_drvdata(rdev);
@@
-183,9
+183,8
@@
static int max597x_set_ocp(struct regulator_dev *rdev, int lim_uA,
val = 0xFF;
reg = MAX5970_REG_DAC_FAST(rdev_id);
- ret = regmap_write(rdev->regmap, reg, val);
- return re
t
;
+ return re
gmap_write(rdev->regmap, reg, val)
;
}
static int max597x_get_status(struct regulator_dev *rdev)