Patch "ASoC: amd: acp: add a null check for chip_pdev structure" 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

    ASoC: amd: acp: add a null check for chip_pdev structure

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:
     asoc-amd-acp-add-a-null-check-for-chip_pdev-structur.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 16d62eb396802c6be13ee9396857b8f2e57dacf0
Author: Vijendar Mukunda <Vijendar.Mukunda@xxxxxxx>
Date:   Mon Jun 17 12:58:34 2024 +0530

    ASoC: amd: acp: add a null check for chip_pdev structure
    
    [ Upstream commit 98d919dfee1cc402ca29d45da642852d7c9a2301 ]
    
    When acp platform device creation is skipped, chip->chip_pdev value will
    remain NULL. Add NULL check for chip->chip_pdev structure in
    snd_acp_resume() function to avoid null pointer dereference.
    
    Fixes: 088a40980efb ("ASoC: amd: acp: add pm ops support for acp pci driver")
    Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@xxxxxxx>
    Link: https://msgid.link/r/20240617072844.871468-1-Vijendar.Mukunda@xxxxxxx
    Signed-off-by: Mark Brown <broonie@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/sound/soc/amd/acp/acp-pci.c b/sound/soc/amd/acp/acp-pci.c
index ad320b29e87dc..aa3e72d134518 100644
--- a/sound/soc/amd/acp/acp-pci.c
+++ b/sound/soc/amd/acp/acp-pci.c
@@ -199,10 +199,12 @@ static int __maybe_unused snd_acp_resume(struct device *dev)
 	ret = acp_init(chip);
 	if (ret)
 		dev_err(dev, "ACP init failed\n");
-	child = chip->chip_pdev->dev;
-	adata = dev_get_drvdata(&child);
-	if (adata)
-		acp_enable_interrupts(adata);
+	if (chip->chip_pdev) {
+		child = chip->chip_pdev->dev;
+		adata = dev_get_drvdata(&child);
+		if (adata)
+			acp_enable_interrupts(adata);
+	}
 	return ret;
 }
 




[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