]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 8 Nov 2023 16:26:34 +0000 (17:26 +0100)
commitcb34f4e79e54fd694c27be76183a8963d71bf95e
tree6499edf025d037f247c1b23ca14077b354e4aad8
parent12952a23a5da6459aaaaa3ae4bc8ce8fef952ef5
ASoC: codecs: wcd938x: fix resource leaks on bind errors

commit da29b94ed3547cee9d510d02eca4009f2de476cf upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
sound/soc/codecs/wcd938x.c