summaryrefslogtreecommitdiffstats
path: root/drivers/mfd/arizona-core.c
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2012-07-05 20:35:29 +0100
committerSamuel Ortiz <sameo@linux.intel.com>2012-07-09 00:39:06 +0200
commit5879f5710e684af662635770561112ce3f25ea8c (patch)
treec5430dcdb7a27117f0126fb37def41be248a0ad0 /drivers/mfd/arizona-core.c
parentde2233365d5abc94993378330768786de2c606f6 (diff)
downloadlinux-5879f5710e684af662635770561112ce3f25ea8c.tar.gz
linux-5879f5710e684af662635770561112ce3f25ea8c.tar.bz2
linux-5879f5710e684af662635770561112ce3f25ea8c.zip
mfd: Release arizona DCVDD if we fail to resume the device
Ensures we don't leak the enable we just did. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'drivers/mfd/arizona-core.c')
-rw-r--r--drivers/mfd/arizona-core.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/mfd/arizona-core.c b/drivers/mfd/arizona-core.c
index c8946a889a78..e1308b5214ba 100644
--- a/drivers/mfd/arizona-core.c
+++ b/drivers/mfd/arizona-core.c
@@ -232,8 +232,10 @@ static int arizona_runtime_resume(struct device *dev)
regcache_cache_only(arizona->regmap, false);
ret = arizona_wait_for_boot(arizona);
- if (ret != 0)
+ if (ret != 0) {
+ regulator_disable(arizona->dcvdd);
return ret;
+ }
regcache_sync(arizona->regmap);