ASoC: codecs: wcd938x: fix resource leaks on bind errors
authorJohan Hovold <johan+linaro@kernel.org>
Tue, 3 Oct 2023 15:55:54 +0000 (17:55 +0200)
committerMark Brown <broonie@kernel.org>
Mon, 9 Oct 2023 12:03:34 +0000 (13:03 +0100)
commitda29b94ed3547cee9d510d02eca4009f2de476cf
tree0eb4882865259b286b8f66a6ac54ea4950ef7b29
parentfa2f8a991ba4aa733ac1c3b1be0c86148aa4c52c
ASoC: codecs: wcd938x: fix resource leaks on bind errors

Add the missing code to release resources on bind errors, including the
references taken by wcd938x_sdw_device_get() which also need to be
dropped on unbind().

Fixes: 16572522aece ("ASoC: codecs: wcd938x-sdw: add SoundWire driver")
Cc: stable@vger.kernel.org # 5.14
Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
Link: https://lore.kernel.org/r/20231003155558.27079-4-johan+linaro@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/wcd938x.c