From: Mengdong Lin Date: Wed, 27 Apr 2016 06:52:38 +0000 (+0800) Subject: ASoC: topology: Check failure to create a widget X-Git-Tag: v4.7-rc1~11^2^2~11^2~2 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=7de76b621f77aba456f594e4621eca2e94a146f3;p=karo-tx-linux.git ASoC: topology: Check failure to create a widget Stop loading topology info if error happens when creating a widget. Signed-off-by: Mengdong Lin Signed-off-by: Mark Brown --- diff --git a/sound/soc/soc-topology.c b/sound/soc/soc-topology.c index ca5f82885031..0224a6458f3b 100644 --- a/sound/soc/soc-topology.c +++ b/sound/soc/soc-topology.c @@ -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;