lkml.org 
[lkml]   [2012]   [Jul]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 2/6] mfd: arizona: Release DCVDD if we fail to resume the device
Date
Ensures we don't leak the enable we just did.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
---
drivers/mfd/arizona-core.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/mfd/arizona-core.c b/drivers/mfd/arizona-core.c
index d5ef6fa..2ca43a0 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);

--
1.7.10


\
 
 \ /
  Last update: 2012-07-05 22:21    [W:0.054 / U:25.224 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site