OSDN Git Service

ASoC: mchp-i2s-mcc: Fix unprepare of GCLK
authorCodrin Ciubotariu <codrin.ciubotariu@microchip.com>
Tue, 20 Aug 2019 16:24:09 +0000 (19:24 +0300)
committerMark Brown <broonie@kernel.org>
Tue, 20 Aug 2019 17:36:32 +0000 (18:36 +0100)
commit988b59467b2b14523a266957affbe9eca3e99fc9
treeb74616bb49af5f50146d33070ce2be12bad048b8
parentbf283a05c09b58db83afbb1a8a3c6a684c56c1bb
ASoC: mchp-i2s-mcc: Fix unprepare of GCLK

If hw_free() gets called after hw_params(), GCLK remains prepared,
preventing further use of it. This patch fixes this by unpreparing the
clock in hw_free() or if hw_params() gets an error.

Fixes: 7e0cdf545a55 ("ASoC: mchp-i2s-mcc: add driver for I2SC Multi-Channel Controller")
Signed-off-by: Codrin Ciubotariu <codrin.ciubotariu@microchip.com>
Link: https://lore.kernel.org/r/20190820162411.24836-2-codrin.ciubotariu@microchip.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/atmel/mchp-i2s-mcc.c