mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-05 18:41:58 +09:00
ASoC: SOF: core: Only call sof_ops_free() on remove if the probe was successful
[ Upstream commit31bb7bd9ff] All the fail paths during probe will free up the ops, on remove we should only free it if the probe was successful. Fixes:bc433fd76f("ASoC: SOF: Add ops_free") Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: Rander Wang <rander.wang@intel.com> Link: https://lore.kernel.org/r/20230915124015.19637-1-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
211aac2ef6
commit
16fd3c37d1
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user