projects
/
GitHub
/
LineageOS
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
38dbfb5
)
regulator: lp872x: Do not hardcode return values
author
Sachin Kamat
<sachin.kamat@linaro.org>
Tue, 18 Feb 2014 10:41:02 +0000
(16:11 +0530)
committer
Mark Brown
<broonie@linaro.org>
Wed, 19 Feb 2014 16:26:02 +0000
(
01:26
+0900)
Propagate the error values returned by the function instead.
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
drivers/regulator/lp872x.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/regulator/lp872x.c
b/drivers/regulator/lp872x.c
index 2e4734ff79fce29eaa2cab621b2e13cfa565a0da..2e022aabd951264bdc575d6b32fbdaa148d77298 100644
(file)
--- a/
drivers/regulator/lp872x.c
+++ b/
drivers/regulator/lp872x.c
@@
-211,7
+211,7
@@
static int lp872x_get_timestep_usec(struct lp872x *lp)
ret = lp872x_read_byte(lp, LP872X_GENERAL_CFG, &val);
if (ret)
- return
-EINVAL
;
+ return
ret
;
val = (val & mask) >> shift;
if (val >= size)
@@
-229,7
+229,7
@@
static int lp872x_regulator_enable_time(struct regulator_dev *rdev)
u8 addr, val;
if (time_step_us < 0)
- return
-EINVAL
;
+ return
time_step_us
;
switch (rid) {
case LP8720_ID_LDO1 ... LP8720_ID_BUCK: