Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

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
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -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;