summaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorFabio Estevam <fabio.estevam@nxp.com>2016-03-28 08:31:18 -0300
committerMark Brown <broonie@kernel.org>2016-03-29 10:02:24 -0700
commit65147846796bd443972d9055b3b4c1339e15d53a (patch)
treea0e5a44f67ff8ac3d3e74562f9f11d5703073202 /sound
parentf55532a0c0b8bb6148f4e07853b876ef73bc69ca (diff)
downloadop-kernel-dev-65147846796bd443972d9055b3b4c1339e15d53a.zip
op-kernel-dev-65147846796bd443972d9055b3b4c1339e15d53a.tar.gz
ASoC: wm8962: Disable clock if wm8962_runtime_resume() fails
When regulator_bulk_enable() fails inside wm8962_runtime_resume(), we should disable the previously enabled clock. Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com> Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/codecs/wm8962.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/sound/soc/codecs/wm8962.c b/sound/soc/codecs/wm8962.c
index 8822360..f3f71ba 100644
--- a/sound/soc/codecs/wm8962.c
+++ b/sound/soc/codecs/wm8962.c
@@ -3800,7 +3800,7 @@ static int wm8962_runtime_resume(struct device *dev)
if (ret != 0) {
dev_err(dev,
"Failed to enable supplies: %d\n", ret);
- return ret;
+ goto disable_clock;
}
regcache_cache_only(wm8962->regmap, false);
@@ -3838,6 +3838,10 @@ static int wm8962_runtime_resume(struct device *dev)
msleep(5);
return 0;
+
+disable_clock:
+ clk_disable_unprepare(wm8962->pdata.mclk);
+ return ret;
}
static int wm8962_runtime_suspend(struct device *dev)
OpenPOWER on IntegriCloud