diff options
author | Wei Yongjun <weiyj.lk@gmail.com> | 2016-08-10 09:53:21 -0400 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2016-08-11 10:25:50 -0400 |
commit | 61743bfaf061e253a58a3a2f22659405cc95939a (patch) | |
tree | 4d4d9ced29807e74699b79ff4b85f19432a142bc | |
parent | 6b0ffacdaf549d66a0c2a838d68f18495980def4 (diff) |
ASoC: atmel-pdmic: add missing clk_disable_unprepare() on error in atmel_pdmic_cpu_dai_startup()
Add the missing clk_disable_unprepare() before return from
atmel_pdmic_cpu_dai_startup() in the error handling case.
Signed-off-by: Wei Yongjun <weiyj.lk@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r-- | sound/soc/atmel/atmel-pdmic.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sound/soc/atmel/atmel-pdmic.c b/sound/soc/atmel/atmel-pdmic.c index 4cce36e07360..8b4beb07ca43 100644 --- a/sound/soc/atmel/atmel-pdmic.c +++ b/sound/soc/atmel/atmel-pdmic.c | |||
@@ -115,8 +115,10 @@ static int atmel_pdmic_cpu_dai_startup(struct snd_pcm_substream *substream, | |||
115 | return ret; | 115 | return ret; |
116 | 116 | ||
117 | ret = clk_prepare_enable(dd->pclk); | 117 | ret = clk_prepare_enable(dd->pclk); |
118 | if (ret) | 118 | if (ret) { |
119 | clk_disable_unprepare(dd->gclk); | ||
119 | return ret; | 120 | return ret; |
121 | } | ||
120 | 122 | ||
121 | /* Clear all bits in the Control Register(PDMIC_CR) */ | 123 | /* Clear all bits in the Control Register(PDMIC_CR) */ |
122 | regmap_write(dd->regmap, PDMIC_CR, 0); | 124 | regmap_write(dd->regmap, PDMIC_CR, 0); |