diff mbox series

[v3,3/3] ALSA: hda/realtek: Delete cs35l41 component master during free

Message ID 20230606103436.455348-4-sbinding@opensource.cirrus.com
State Accepted
Commit ebcbfd846367c980e105c787d372c4239e9ed922
Headers show
Series Fixes and cleanup for CS35L41 HDA | expand

Commit Message

Stefan Binding June 6, 2023, 10:34 a.m. UTC
This ensures that the driver is properly cleaned up when freed.

Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com>
---
 sound/pci/hda/patch_realtek.c | 3 +++
 1 file changed, 3 insertions(+)
diff mbox series

Patch

diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index f10790ace5c1d..a0e88fd17aa42 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -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;
 	}
 }