Patch "ASoC: SOF: core: Only call sof_ops_free() on remove if the probe was successful" has been added to the 6.1-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: SOF: core: Only call sof_ops_free() on remove if the probe was successful

to the 6.1-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-sof-core-only-call-sof_ops_free-on-remove-if-th.patch
and it can be found in the queue-6.1 subdirectory.

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



commit e700b53f38a0499556cc1daa68ecd2ecb42c8250
Author: Peter Ujfalusi <peter.ujfalusi@xxxxxxxxxxxxxxx>
Date:   Fri Sep 15 15:40:15 2023 +0300

    ASoC: SOF: core: Only call sof_ops_free() on remove if the probe was successful
    
    [ Upstream commit 31bb7bd9ffee50d09ec931998b823a86132ab807 ]
    
    All the fail paths during probe will free up the ops, on remove we should
    only free it if the probe was successful.
    
    Fixes: bc433fd76fae ("ASoC: SOF: Add ops_free")
    Signed-off-by: Peter Ujfalusi <peter.ujfalusi@xxxxxxxxxxxxxxx>
    Reviewed-by: Bard Liao <yung-chuan.liao@xxxxxxxxxxxxxxx>
    Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@xxxxxxxxxxxxxxx>
    Reviewed-by: Ranjani Sridharan <ranjani.sridharan@xxxxxxxxxxxxxxx>
    Reviewed-by: Rander Wang <rander.wang@xxxxxxxxx>
    Link: https://lore.kernel.org/r/20230915124015.19637-1-peter.ujfalusi@xxxxxxxxxxxxxxx
    Signed-off-by: Mark Brown <broonie@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/sound/soc/sof/core.c b/sound/soc/sof/core.c
index 75a1e2c6539f2..eaa16755a2704 100644
--- a/sound/soc/sof/core.c
+++ b/sound/soc/sof/core.c
@@ -461,10 +461,9 @@ int snd_sof_device_remove(struct device *dev)
 		snd_sof_ipc_free(sdev);
 		snd_sof_free_debug(sdev);
 		snd_sof_remove(sdev);
+		sof_ops_free(sdev);
 	}
 
-	sof_ops_free(sdev);
-
 	/* release firmware */
 	snd_sof_fw_unload(sdev);
 



[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