Patch "ALSA: hda: cs35l56: Fix lifecycle of codec pointer" has been added to the 6.9-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    ALSA: hda: cs35l56: Fix lifecycle of codec pointer

to the 6.9-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     alsa-hda-cs35l56-fix-lifecycle-of-codec-pointer.patch
and it can be found in the queue-6.9 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit fac68d5707a604f160ee901e0c9f66368547e6c8
Author: Simon Trimmer <simont@xxxxxxxxxxxxxxxxxxxxx>
Date:   Fri May 31 12:27:16 2024 +0100

    ALSA: hda: cs35l56: Fix lifecycle of codec pointer
    
    [ Upstream commit d339131bf02d4ed918415574082caf5e8af6e664 ]
    
    The codec should be cleared when the amp driver is unbound and when
    resuming it should be tested to prevent loading firmware into the device
    and ALSA in a partially configured system state.
    
    Signed-off-by: Simon Trimmer <simont@xxxxxxxxxxxxxxxxxxxxx>
    Link: https://lore.kernel.org/r/20240531112716.25323-1-simont@xxxxxxxxxxxxxxxxxxxxx
    Signed-off-by: Takashi Iwai <tiwai@xxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/sound/pci/hda/cs35l56_hda.c b/sound/pci/hda/cs35l56_hda.c
index 6b77c38a0e155..e134ede6c5aa5 100644
--- a/sound/pci/hda/cs35l56_hda.c
+++ b/sound/pci/hda/cs35l56_hda.c
@@ -735,6 +735,8 @@ static void cs35l56_hda_unbind(struct device *dev, struct device *master, void *
 	if (comps[cs35l56->index].dev == dev)
 		memset(&comps[cs35l56->index], 0, sizeof(*comps));
 
+	cs35l56->codec = NULL;
+
 	dev_dbg(cs35l56->base.dev, "Unbound\n");
 }
 
@@ -840,6 +842,9 @@ static int cs35l56_hda_system_resume(struct device *dev)
 
 	cs35l56->suspended = false;
 
+	if (!cs35l56->codec)
+		return 0;
+
 	ret = cs35l56_is_fw_reload_needed(&cs35l56->base);
 	dev_dbg(cs35l56->base.dev, "fw_reload_needed: %d\n", ret);
 	if (ret > 0) {




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux