]> www.infradead.org Git - users/dwmw2/linux.git/commit
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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 5 Oct 2019 11:13:43 +0000 (13:13 +0200)
commitcb00bdfdf4a1c160300ed3c9c897eb91e274f7e2
tree7f7b441cf837d833545654847a5aa98fcad2b62a
parentfd3a27888511038c7b1e99a6bd15e4b9f2eb2105
ASoC: mchp-i2s-mcc: Fix unprepare of GCLK

[ Upstream commit 988b59467b2b14523a266957affbe9eca3e99fc9 ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
sound/soc/atmel/mchp-i2s-mcc.c