ASoC: atmel-pdmic: add missing clk_disable_unprepare() on error in atmel_pdmic_cpu_da...
authorWei Yongjun <weiyj.lk@gmail.com>
Wed, 10 Aug 2016 13:53:21 +0000 (13:53 +0000)
committerMark Brown <broonie@kernel.org>
Thu, 11 Aug 2016 14:25:50 +0000 (15:25 +0100)
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>
sound/soc/atmel/atmel-pdmic.c

index 4cce36e073600824d8073aaaf53e394fcbd42471..8b4beb07ca43fd96f3735917455266280448fb63 100644 (file)
@@ -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);
This page took 0.026785 seconds and 5 git commands to generate.