aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/sound/soc/soc-topology.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2020-03-09 19:49:58 +0100
committerTakashi Iwai <tiwai@suse.de>2020-03-09 19:50:18 +0100
commitcf4afed90c1f926d12277213b54d830c839a1bda (patch)
treeb1c7319e85443d097634ef6a3d4623afc64188cb /sound/soc/soc-topology.c
parentALSA: firewire: use KBUILD_MODNAME for struct driver.name instead of string (diff)
parentALSA: line6: Fix endless MIDI read loop (diff)
downloadwireguard-linux-cf4afed90c1f926d12277213b54d830c839a1bda.tar.xz
wireguard-linux-cf4afed90c1f926d12277213b54d830c839a1bda.zip
Merge branch 'for-linus' into for-next
Back-merge of 5.6 devel branch for further changes in 5.7 cycle Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/soc/soc-topology.c')
-rw-r--r--sound/soc/soc-topology.c17
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 */