OSDN Git Service
(root)
/
uclinux-h8
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2e3d667
)
iio: adc: vf610: Disable the regulator on error
author
Fabio Estevam
<fabio.estevam@freescale.com>
Fri, 3 Oct 2014 01:25:24 +0000
(22:25 -0300)
committer
Jonathan Cameron
<jic23@kernel.org>
Sat, 4 Oct 2014 11:30:26 +0000
(12:30 +0100)
If clk_prepare_enable() fails we should disable the regulator that was
previously enabled.
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
drivers/iio/adc/vf610_adc.c
patch
|
blob
|
history
diff --git
a/drivers/iio/adc/vf610_adc.c
b/drivers/iio/adc/vf610_adc.c
index
ebb73f5
..
767e9b9
100644
(file)
--- a/
drivers/iio/adc/vf610_adc.c
+++ b/
drivers/iio/adc/vf610_adc.c
@@
-704,11
+704,15
@@
static int vf610_adc_resume(struct device *dev)
ret = clk_prepare_enable(info->clk);
if (ret)
-
return ret
;
+
goto disable_reg
;
vf610_adc_hw_init(info);
return 0;
+
+disable_reg:
+ regulator_disable(info->vref);
+ return ret;
}
#endif