summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>2021-03-22 05:48:54 +0300
committerMark Brown <broonie@kernel.org>2021-03-25 16:58:54 +0300
commitd908b922c71791568384336ccc3d12a8cbcd1777 (patch)
tree8ec88e638d7e75b8983a45125691c9468f30ae92 /include
parent4a50724eb0ba96b849f4a0c8da28b2b796859f9e (diff)
downloadlinux-d908b922c71791568384336ccc3d12a8cbcd1777.tar.xz
ASoC: soc.h: return error if multi platform at snd_soc_fixup_dai_links_platform_name()
snd_soc_fixup_dai_links_platform_name() is assuming it is single platform. return error if multi platforms. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://lore.kernel.org/r/871rc7aoo9.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'include')
-rw-r--r--include/sound/soc.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/sound/soc.h b/include/sound/soc.h
index 200815ca4112..e746da996351 100644
--- a/include/sound/soc.h
+++ b/include/sound/soc.h
@@ -1280,6 +1280,10 @@ int snd_soc_fixup_dai_links_platform_name(struct snd_soc_card *card,
/* set platform name for each dailink */
for_each_card_prelinks(card, i, dai_link) {
+ /* only single platform is supported for now */
+ if (dai_link->num_platforms != 1)
+ return -EINVAL;
+
if (!dai_link->platforms)
return -EINVAL;