summaryrefslogtreecommitdiffstats
path: root/sound/soc/soc-topology.c
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2020-01-23 13:36:42 +0100
committerMark Brown <broonie@kernel.org>2020-01-23 13:36:42 +0100
commit20230620b44510ce968a719a1d6ee7483583178d (patch)
treed64130534a7dd7a4616785b5fda1f85d13cd5f8f /sound/soc/soc-topology.c
parentLinux 5.5-rc7 (diff)
parentASoC: topology: fix soc_tplg_fe_link_create() - link->dobj initialization order (diff)
downloadlinux-20230620b44510ce968a719a1d6ee7483583178d.tar.xz
linux-20230620b44510ce968a719a1d6ee7483583178d.zip
Merge branch 'asoc-5.5' into asoc-linus
Diffstat (limited to 'sound/soc/soc-topology.c')
-rw-r--r--sound/soc/soc-topology.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/sound/soc/soc-topology.c b/sound/soc/soc-topology.c
index 92e4f4d08bfa..4e1fe623c390 100644
--- a/sound/soc/soc-topology.c
+++ b/sound/soc/soc-topology.c
@@ -1906,6 +1906,10 @@ static int soc_tplg_fe_link_create(struct soc_tplg *tplg,
link->num_codecs = 1;
link->num_platforms = 1;
+ link->dobj.index = tplg->index;
+ link->dobj.ops = tplg->ops;
+ link->dobj.type = SND_SOC_DOBJ_DAI_LINK;
+
if (strlen(pcm->pcm_name)) {
link->name = kstrdup(pcm->pcm_name, GFP_KERNEL);
link->stream_name = kstrdup(pcm->pcm_name, GFP_KERNEL);
@@ -1942,9 +1946,6 @@ static int soc_tplg_fe_link_create(struct soc_tplg *tplg,
goto err;
}
- link->dobj.index = tplg->index;
- link->dobj.ops = tplg->ops;
- link->dobj.type = SND_SOC_DOBJ_DAI_LINK;
list_add(&link->dobj.list, &tplg->comp->dobj_list);
return 0;