alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -next] ASoC: atmel-pdmic: add missing clk_disable_unprepare() on error in atmel_pdmic_cpu_dai_startup()
@ 2016-08-10 13:53 Wei Yongjun
  2016-08-12 12:29 ` Applied "ASoC: atmel-pdmic: add missing clk_disable_unprepare() on error in atmel_pdmic_cpu_dai_startup()" to the asoc tree Mark Brown
  0 siblings, 1 reply; 2+ messages in thread
From: Wei Yongjun @ 2016-08-10 13:53 UTC (permalink / raw)
  To: Nicolas Ferre, Liam Girdwood, Mark Brown, Jaroslav Kysela,
	Takashi Iwai
  Cc: alsa-devel, Wei Yongjun, linux-kernel

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>
---
 sound/soc/atmel/atmel-pdmic.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/sound/soc/atmel/atmel-pdmic.c b/sound/soc/atmel/atmel-pdmic.c
index 2a3a41f..a67e31b 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,
 		return ret;
 
 	ret =  clk_prepare_enable(dd->pclk);
-	if (ret)
+	if (ret) {
+		clk_disable_unprepare(dd->gclk);
 		return ret;
+	}
 
 	/* Clear all bits in the Control Register(PDMIC_CR) */
 	regmap_write(dd->regmap, PDMIC_CR, 0);

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-08-12 12:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-10 13:53 [PATCH -next] ASoC: atmel-pdmic: add missing clk_disable_unprepare() on error in atmel_pdmic_cpu_dai_startup() Wei Yongjun
2016-08-12 12:29 ` Applied "ASoC: atmel-pdmic: add missing clk_disable_unprepare() on error in atmel_pdmic_cpu_dai_startup()" to the asoc tree Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).