Skip to content
Snippets Groups Projects
Commit 1e665626 authored by Peter Ujfalusi's avatar Peter Ujfalusi Committed by Oleksii Kutuzov
Browse files

UPSTREAM: ASoC: SOF: core: Only call sof_ops_free() on remove if the probe was successful


All the fail paths during probe will free up the ops, on remove we should
only free it if the probe was successful.

Fixes: bc433fd7 ("ASoC: SOF: Add ops_free")
Change-Id: I17d140c638146d8cff0ddf00e4a3615c5525dd06
Signed-off-by: default avatarPeter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: default avatarBard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: default avatarPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: default avatarRanjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: default avatarRander Wang <rander.wang@intel.com>
Link: https://lore.kernel.org/r/20230915124015.19637-1-peter.ujfalusi@linux.intel.com


Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent db9884dd
No related branches found
No related tags found
1 merge request!13[UPSTREAM] Add Audio-related patches from Mediatek's Release 24.0
...@@ -486,10 +486,9 @@ int snd_sof_device_remove(struct device *dev) ...@@ -486,10 +486,9 @@ int snd_sof_device_remove(struct device *dev)
snd_sof_ipc_free(sdev); snd_sof_ipc_free(sdev);
snd_sof_free_debug(sdev); snd_sof_free_debug(sdev);
snd_sof_remove(sdev); snd_sof_remove(sdev);
sof_ops_free(sdev);
} }
sof_ops_free(sdev);
/* release firmware */ /* release firmware */
snd_sof_fw_unload(sdev); snd_sof_fw_unload(sdev);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment