]> www.infradead.org Git - users/willy/pagecache.git/commitdiff
ALSA: hda: tas2781: Component should be unbound before deconstruction
authorSimon Trimmer <simont@opensource.cirrus.com>
Thu, 13 Jun 2024 13:37:13 +0000 (14:37 +0100)
committerTakashi Iwai <tiwai@suse.de>
Fri, 14 Jun 2024 12:48:43 +0000 (14:48 +0200)
The interface associated with the hda_component should be deactivated
before the driver is deconstructed during removal.

Fixes: 4e7914eb1dae ("ALSA: hda/tas2781: remove sound controls in unbind")
Signed-off-by: Simon Trimmer <simont@opensource.cirrus.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://lore.kernel.org/r/20240613133713.75550-4-simont@opensource.cirrus.com
sound/pci/hda/tas2781_hda_i2c.c

index 75f7674c66ee7ae8d9c407798193f4618b82a6b7..fdee6592c502d0528b25c642c7fab37f31decf2d 100644 (file)
@@ -777,11 +777,11 @@ static void tas2781_hda_remove(struct device *dev)
 {
        struct tas2781_hda *tas_hda = dev_get_drvdata(dev);
 
+       component_del(tas_hda->dev, &tas2781_hda_comp_ops);
+
        pm_runtime_get_sync(tas_hda->dev);
        pm_runtime_disable(tas_hda->dev);
 
-       component_del(tas_hda->dev, &tas2781_hda_comp_ops);
-
        pm_runtime_put_noidle(tas_hda->dev);
 
        tasdevice_remove(tas_hda->priv);