diff options
author | Mengdong Lin <mengdong.lin@linux.intel.com> | 2016-04-27 14:52:38 +0800 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2016-04-27 17:32:30 +0100 |
commit | 7de76b621f77aba456f594e4621eca2e94a146f3 (patch) | |
tree | 7d09adc53df8bf7f5a7f26be31463fbe01ab1982 /sound | |
parent | 67d1c21e37301ca3cea3705951950ce21f2723e1 (diff) | |
download | linux-stable-7de76b621f77aba456f594e4621eca2e94a146f3.tar.gz linux-stable-7de76b621f77aba456f594e4621eca2e94a146f3.tar.bz2 linux-stable-7de76b621f77aba456f594e4621eca2e94a146f3.zip |
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>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/soc/soc-topology.c | 4 |
1 files changed, 3 insertions, 1 deletions
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; |