diff options
author | Takashi Iwai <tiwai@suse.de> | 2019-02-19 14:35:55 +0300 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2019-02-19 14:35:55 +0300 |
commit | 268836649c07e0d38866006b5e94294b5bbc9806 (patch) | |
tree | fd120e2175b89f0cae808c94990a87bde2811898 /sound/soc/soc-topology.c | |
parent | c8c6ee611926685a7d753409e0a6e48b9e1b8748 (diff) | |
parent | 19dd0777773ab17b4d97f7105e836867c0cdecb4 (diff) | |
download | linux-268836649c07e0d38866006b5e94294b5bbc9806.tar.xz |
Merge tag 'asoc-fix-v5.0-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus
ASoC: Fixes for v5.0
A few small fixes, a driver fix for Samsung, a fix for refcounting of
of_nodes in the simple-card driver that triggered on a lot of systems
and a fix for topology error handling.
Diffstat (limited to 'sound/soc/soc-topology.c')
-rw-r--r-- | sound/soc/soc-topology.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/sound/soc/soc-topology.c b/sound/soc/soc-topology.c index fc79ec6927e3..731b963b6995 100644 --- a/sound/soc/soc-topology.c +++ b/sound/soc/soc-topology.c @@ -2487,6 +2487,7 @@ int snd_soc_tplg_component_load(struct snd_soc_component *comp, struct snd_soc_tplg_ops *ops, const struct firmware *fw, u32 id) { struct soc_tplg tplg; + int ret; /* setup parsing context */ memset(&tplg, 0, sizeof(tplg)); @@ -2500,7 +2501,12 @@ int snd_soc_tplg_component_load(struct snd_soc_component *comp, tplg.bytes_ext_ops = ops->bytes_ext_ops; tplg.bytes_ext_ops_count = ops->bytes_ext_ops_count; - return soc_tplg_load(&tplg); + ret = soc_tplg_load(&tplg); + /* free the created components if fail to load topology */ + if (ret) + snd_soc_tplg_component_remove(comp, SND_SOC_TPLG_INDEX_ALL); + + return ret; } EXPORT_SYMBOL_GPL(snd_soc_tplg_component_load); |