Skip to content

Commit fa2f8a9

Browse files
jhovoldbroonie
authored andcommitted
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: 1657252 ("ASoC: codecs: wcd938x-sdw: add SoundWire driver") Cc: [email protected] # 5.14 Cc: Srinivas Kandagatla <[email protected]> Signed-off-by: Johan Hovold <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent bfbc79d commit fa2f8a9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sound/soc/codecs/wcd938x.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3504,10 +3504,10 @@ static void wcd938x_unbind(struct device *dev)
35043504
{
35053505
struct wcd938x_priv *wcd938x = dev_get_drvdata(dev);
35063506

3507+
snd_soc_unregister_component(dev);
35073508
device_link_remove(dev, wcd938x->txdev);
35083509
device_link_remove(dev, wcd938x->rxdev);
35093510
device_link_remove(wcd938x->rxdev, wcd938x->txdev);
3510-
snd_soc_unregister_component(dev);
35113511
component_unbind_all(dev, wcd938x);
35123512
}
35133513

0 commit comments

Comments
 (0)