Commit 7de76b62 authored by Mengdong Lin's avatar Mengdong Lin Committed by Mark Brown

ASoC: topology: Check failure to create a widget

Stop loading topology info if error happens when creating a widget.
Signed-off-by: default avatarMengdong Lin <mengdong.lin@linux.intel.com>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 67d1c21e
...@@ -1500,9 +1500,11 @@ static int soc_tplg_dapm_widget_elems_load(struct soc_tplg *tplg, ...@@ -1500,9 +1500,11 @@ static int soc_tplg_dapm_widget_elems_load(struct soc_tplg *tplg,
for (i = 0; i < count; i++) { for (i = 0; i < count; i++) {
widget = (struct snd_soc_tplg_dapm_widget *) tplg->pos; widget = (struct snd_soc_tplg_dapm_widget *) tplg->pos;
ret = soc_tplg_dapm_widget_create(tplg, widget); ret = soc_tplg_dapm_widget_create(tplg, widget);
if (ret < 0) if (ret < 0) {
dev_err(tplg->dev, "ASoC: failed to load widget %s\n", dev_err(tplg->dev, "ASoC: failed to load widget %s\n",
widget->name); widget->name);
return ret;
}
} }
return 0; return 0;
......
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