diff options
author | Johan Hovold <johan+linaro@kernel.org> | 2023-10-03 18:55:53 +0300 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2023-10-09 15:03:33 +0300 |
commit | fa2f8a991ba4aa733ac1c3b1be0c86148aa4c52c (patch) | |
tree | f3b2583735803259471c0cd564fa52cb0ffa5738 | |
parent | bfbc79de60c53e5fed505390440b87ef59ee268c (diff) | |
download | linux-fa2f8a991ba4aa733ac1c3b1be0c86148aa4c52c.tar.xz |
ASoC: codecs: wcd938x: fix unbind tear down order
Make sure to deregister the component before tearing down the resources
it depends on during 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-3-johan+linaro@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r-- | sound/soc/codecs/wcd938x.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/soc/codecs/wcd938x.c b/sound/soc/codecs/wcd938x.c index cf1eaf678fc2..c617fc3ce489 100644 --- a/sound/soc/codecs/wcd938x.c +++ b/sound/soc/codecs/wcd938x.c @@ -3504,10 +3504,10 @@ static void wcd938x_unbind(struct device *dev) { struct wcd938x_priv *wcd938x = dev_get_drvdata(dev); + snd_soc_unregister_component(dev); device_link_remove(dev, wcd938x->txdev); device_link_remove(dev, wcd938x->rxdev); device_link_remove(wcd938x->rxdev, wcd938x->txdev); - snd_soc_unregister_component(dev); component_unbind_all(dev, wcd938x); } |