Skip to content

Commit

Permalink
ASoC: SOF: core: Only call sof_ops_free() on remove if the probe was …
Browse files Browse the repository at this point in the history
…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: bc433fd ("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>
  • Loading branch information
Peter Ujfalusi authored and Mark Brown committed Sep 15, 2023
1 parent e0f9624 commit 31bb7bd
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions sound/soc/sof/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 31bb7bd

Please sign in to comment.