diff options
author | 2020-02-24 22:26:06 +0000 | |
---|---|---|
committer | 2020-02-24 22:26:06 +0000 | |
commit | 6c8beff74c6aafa60cb69b44139de58b74a775e7 (patch) | |
tree | beeb7ed4968bb1426a38fbc77e3d71ecd4306fbd /sound/soc/soc-topology.c | |
parent | ASoC: soc-pcm cleanup step4 (diff) | |
parent | ASoC: Intel: Skylake: Fix available clock counter incrementation (diff) | |
download | linux-6c8beff74c6aafa60cb69b44139de58b74a775e7.tar.gz linux-6c8beff74c6aafa60cb69b44139de58b74a775e7.tar.bz2 linux-6c8beff74c6aafa60cb69b44139de58b74a775e7.zip |
Merge branch 'for-5.6' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-5.7
Diffstat (limited to 'sound/soc/soc-topology.c')
-rw-r--r-- | sound/soc/soc-topology.c | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/sound/soc/soc-topology.c b/sound/soc/soc-topology.c index d2ee6ad20e83..575da6aba807 100644 --- a/sound/soc/soc-topology.c +++ b/sound/soc/soc-topology.c @@ -2377,8 +2377,11 @@ static int soc_tplg_link_elems_load(struct soc_tplg *tplg, } ret = soc_tplg_link_config(tplg, _link); - if (ret < 0) + if (ret < 0) { + if (!abi_match) + kfree(_link); return ret; + } /* offset by version-specific struct size and * real priv data size @@ -2542,7 +2545,7 @@ static int soc_tplg_manifest_load(struct soc_tplg *tplg, { struct snd_soc_tplg_manifest *manifest, *_manifest; bool abi_match; - int err; + int ret = 0; if (tplg->pass != SOC_TPLG_PASS_MANIFEST) return 0; @@ -2555,19 +2558,19 @@ static int soc_tplg_manifest_load(struct soc_tplg *tplg, _manifest = manifest; } else { abi_match = false; - err = manifest_new_ver(tplg, manifest, &_manifest); - if (err < 0) - return err; + ret = manifest_new_ver(tplg, manifest, &_manifest); + if (ret < 0) + return ret; } /* pass control to component driver for optional further init */ if (tplg->comp && tplg->ops && tplg->ops->manifest) - return tplg->ops->manifest(tplg->comp, tplg->index, _manifest); + ret = tplg->ops->manifest(tplg->comp, tplg->index, _manifest); if (!abi_match) /* free the duplicated one */ kfree(_manifest); - return 0; + return ret; } /* validate header magic, size and type */ |