mirror of
https://github.com/torvalds/linux.git
synced 2024-11-24 05:02:12 +00:00
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>
This commit is contained in:
parent
6b0ffacdaf
commit
61743bfaf0
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user