ALSA: hda/realtek: Delete cs35l41 component master during free
authorStefan Binding <sbinding@opensource.cirrus.com>
Tue, 6 Jun 2023 10:34:36 +0000 (11:34 +0100)
committerTakashi Iwai <tiwai@suse.de>
Tue, 6 Jun 2023 12:32:05 +0000 (14:32 +0200)
This ensures that the driver is properly cleaned up when freed.

Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20230606103436.455348-4-sbinding@opensource.cirrus.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/pci/hda/patch_realtek.c

index 172ffc2..ce9a9cb 100644 (file)
@@ -6757,6 +6757,9 @@ static void cs35l41_generic_fixup(struct hda_codec *cdc, int action, const char
                else
                        spec->gen.pcm_playback_hook = comp_generic_playback_hook;
                break;
+       case HDA_FIXUP_ACT_FREE:
+               component_master_del(dev, &comp_master_ops);
+               break;
        }
 }