mirror of
https://github.com/torvalds/linux.git
synced 2026-10-07 05:31:08 -04:00
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: bc433fd76f ("ASoC: SOF: Add ops_free")
Signed-off-by: Peter Ujfalusi <[email protected]>
Reviewed-by: Bard Liao <[email protected]>
Reviewed-by: Pierre-Louis Bossart <[email protected]>
Reviewed-by: Ranjani Sridharan <[email protected]>
Reviewed-by: Rander Wang <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Mark Brown <[email protected]>
This commit is contained in:
1 parent
e0f96246c4
commit
31bb7bd9ff
1 file changed
+1
-2
@@ -486,10 +486,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