ASoC: codecs: wcd938x: fix regulator leaks on probe errors
authorJohan Hovold <johan+linaro@kernel.org>
Tue, 3 Oct 2023 15:55:55 +0000 (17:55 +0200)
committerMark Brown <broonie@kernel.org>
Mon, 9 Oct 2023 12:03:35 +0000 (13:03 +0100)
commit69a026a2357ee69983690d07976de44ef26ee38a
tree12ddc95076a0b19ad5ae2e8572c64eea755e7431
parentda29b94ed3547cee9d510d02eca4009f2de476cf
ASoC: codecs: wcd938x: fix regulator leaks on probe errors

Make sure to disable and free the regulators on probe errors and on
driver 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-5-johan+linaro@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/wcd938x.c