2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-22 12:14:01 +08:00

ASoC: topology: Check failure to create a widget

Stop loading topology info if error happens when creating a widget.

Signed-off-by: Mengdong Lin <mengdong.lin@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
Mengdong Lin 2016-04-27 14:52:38 +08:00 committed by Mark Brown
parent 67d1c21e37
commit 7de76b621f

View File

@ -1500,9 +1500,11 @@ static int soc_tplg_dapm_widget_elems_load(struct soc_tplg *tplg,
for (i = 0; i < count; i++) {
widget = (struct snd_soc_tplg_dapm_widget *) tplg->pos;
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",
widget->name);
return ret;
}
}
return 0;