]> git.ipfire.org Git - thirdparty/linux.git/commit
ASoC: Intel: bytcht_es8316: Fix MCLK leak on init errors
authorCássio Gabriel <cassiogabrielcontato@gmail.com>
Tue, 19 May 2026 16:51:47 +0000 (13:51 -0300)
committerMark Brown <broonie@kernel.org>
Mon, 25 May 2026 12:33:23 +0000 (13:33 +0100)
commitafb2a3a9d8369d18122a0d7cd294eba9a98259c6
tree15b4403689d59bc88dab8e87884e818e4f6674b5
parente7ae89a0c97ce2b68b0983cd01eda67cf373517d
ASoC: Intel: bytcht_es8316: Fix MCLK leak on init errors

byt_cht_es8316_init() enables MCLK before configuring the codec sysclk
and creating the headset jack. If either of those later steps fails, the
function returns without disabling MCLK, leaving the clock enabled after
card registration fails.

Track whether this driver enabled MCLK and disable it on the init error
paths. Add the matching DAI link exit callback so the same clock enable
is also balanced when ASoC cleans up a successfully initialized link.

Fixes: a03bdaa565cb ("ASoC: Intel: add machine driver for BYT/CHT + ES8316")
Signed-off-by: Cássio Gabriel <cassiogabrielcontato@gmail.com>
Link: https://patch.msgid.link/20260519-asoc-bytcht-es8316-mclk-leak-v1-1-b4a11cdc2afd@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/intel/boards/bytcht_es8316.c