Skip to content

Commit

Permalink
FROMGIT: ASoC: SOF: core: remove snd_soc_unregister_component in case…
Browse files Browse the repository at this point in the history
… of error

No need to call snd_soc_unregister_component in case of error
because the component device is resource-managed.

Fixes: c16211d ("ASoC: SOF: Add Sound Open Firmware driver core")
Reviewed-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
(cherry picked from commit 13931ae
 git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next)

BUG=b:134688240
TEST=Test Audio use cases for CML with full SOF patch series applied.

Signed-off-by: Ap, Kamal <kamal.ap@intel.corp-partner.google.com>
  • Loading branch information
ranj063 authored and bzhg committed Jun 28, 2019
1 parent c62f24e commit f07363e
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions sound/soc/sof/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,7 @@ static int sof_probe_continue(struct snd_sof_dev *sdev)

if (IS_ERR(plat_data->pdev_mach)) {
ret = PTR_ERR(plat_data->pdev_mach);
goto comp_err;
goto fw_run_err;
}

dev_dbg(sdev->dev, "created machine %s\n",
Expand All @@ -393,8 +393,6 @@ static int sof_probe_continue(struct snd_sof_dev *sdev)

return 0;

comp_err:
snd_soc_unregister_component(sdev->dev);
fw_run_err:
snd_sof_fw_unload(sdev);
fw_load_err:
Expand Down

0 comments on commit f07363e

Please sign in to comment.