Commit 37e97e6f authored by Pierre-Louis Bossart's avatar Pierre-Louis Bossart Committed by Mark Brown

ASoC: SOF: core: free trace on errors

free_trace() is not called on probe errors, fix
Reviewed-by: default avatarKai Vehmanen <kai.vehmanen@linux.intel.com>
Signed-off-by: default avatarPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20200124213625.30186-3-pierre-louis.bossart@linux.intel.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
Cc: stable@vger.kernel.org
parent 4f7f9564
...@@ -224,12 +224,12 @@ static int sof_probe_continue(struct snd_sof_dev *sdev) ...@@ -224,12 +224,12 @@ static int sof_probe_continue(struct snd_sof_dev *sdev)
if (ret < 0) { if (ret < 0) {
dev_err(sdev->dev, dev_err(sdev->dev,
"error: failed to register DSP DAI driver %d\n", ret); "error: failed to register DSP DAI driver %d\n", ret);
goto fw_run_err; goto fw_trace_err;
} }
ret = snd_sof_machine_register(sdev, plat_data); ret = snd_sof_machine_register(sdev, plat_data);
if (ret < 0) if (ret < 0)
goto fw_run_err; goto fw_trace_err;
/* /*
* Some platforms in SOF, ex: BYT, may not have their platform PM * Some platforms in SOF, ex: BYT, may not have their platform PM
...@@ -245,6 +245,8 @@ static int sof_probe_continue(struct snd_sof_dev *sdev) ...@@ -245,6 +245,8 @@ static int sof_probe_continue(struct snd_sof_dev *sdev)
return 0; return 0;
#if !IS_ENABLED(CONFIG_SND_SOC_SOF_PROBE_WORK_QUEUE) #if !IS_ENABLED(CONFIG_SND_SOC_SOF_PROBE_WORK_QUEUE)
fw_trace_err:
snd_sof_free_trace(sdev);
fw_run_err: fw_run_err:
snd_sof_fw_unload(sdev); snd_sof_fw_unload(sdev);
fw_load_err: fw_load_err:
...@@ -262,6 +264,7 @@ static int sof_probe_continue(struct snd_sof_dev *sdev) ...@@ -262,6 +264,7 @@ static int sof_probe_continue(struct snd_sof_dev *sdev)
* snd_sof_device_remove() when the PCI/ACPI device is removed * snd_sof_device_remove() when the PCI/ACPI device is removed
*/ */
fw_trace_err:
fw_run_err: fw_run_err:
fw_load_err: fw_load_err:
ipc_err: ipc_err:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment