Commit 11fd6d8e authored by Guennadi Liakhovetski's avatar Guennadi Liakhovetski Committed by Mark Brown

ASoC: SOF: fix debugfs initialisation error handling

If debugfs initialisation fails partially in sof_probe_continue() some
debugfs files and the root directory might have been created
successfully. They have to be cleaned up if some of them failed too.
Reviewed-by: default avatarRanjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: default avatarXiuli Pan <xiulipan@outlook.com>
Signed-off-by: default avatarGuennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Signed-off-by: default avatarPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20210315163932.18663-2-pierre-louis.bossart@linux.intel.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent 54d796b8
...@@ -154,7 +154,7 @@ static int sof_probe_continue(struct snd_sof_dev *sdev) ...@@ -154,7 +154,7 @@ static int sof_probe_continue(struct snd_sof_dev *sdev)
if (ret < 0) { if (ret < 0) {
dev_err(sdev->dev, "error: failed to get machine info %d\n", dev_err(sdev->dev, "error: failed to get machine info %d\n",
ret); ret);
goto dbg_err; goto dsp_err;
} }
/* set up platform component driver */ /* set up platform component driver */
...@@ -257,8 +257,9 @@ static int sof_probe_continue(struct snd_sof_dev *sdev) ...@@ -257,8 +257,9 @@ static int sof_probe_continue(struct snd_sof_dev *sdev)
fw_load_err: fw_load_err:
snd_sof_ipc_free(sdev); snd_sof_ipc_free(sdev);
ipc_err: ipc_err:
snd_sof_free_debug(sdev);
dbg_err: dbg_err:
snd_sof_free_debug(sdev);
dsp_err:
snd_sof_remove(sdev); snd_sof_remove(sdev);
/* all resources freed, update state to match */ /* all resources freed, update state to match */
......
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