ASoC: codecs: wcd934x: fix resource leaks on component remove
authorJohan Hovold <johan+linaro@kernel.org>
Wed, 5 Jul 2023 12:30:15 +0000 (14:30 +0200)
committerMark Brown <broonie@kernel.org>
Thu, 6 Jul 2023 12:46:29 +0000 (13:46 +0100)
commit798590cc7d3c2b5f3a7548d96dd4d8a081c1bc39
tree54e535a673f65b25a22343568e5fc9ee9e8b8808
parenta3406f87775fee986876e03f93a84385f54d5999
ASoC: codecs: wcd934x: fix resource leaks on component remove

Make sure to release allocated MBHC resources also on component remove.

This is specifically needed to allow probe deferrals of the sound card
which otherwise fails when reprobing the codec component.

Fixes: 9fb9b1690f0b ("ASoC: codecs: wcd934x: add mbhc support")
Cc: stable@vger.kernel.org # 5.14
Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20230705123018.30903-6-johan+linaro@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/wcd934x.c