mfd: Release arizona DCVDD if we fail to resume the device
authorMark Brown <broonie@opensource.wolfsonmicro.com>
Thu, 5 Jul 2012 19:35:29 +0000 (20:35 +0100)
committerSamuel Ortiz <sameo@linux.intel.com>
Sun, 8 Jul 2012 22:39:06 +0000 (00:39 +0200)
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>
drivers/mfd/arizona-core.c

index c8946a889a78accd6b2e6713d2dd1e1e17201d24..e1308b5214ba264c3d1c705c8c08bc74ce67dfd9 100644 (file)
@@ -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);