[PATCH 3/3] ASoC: soc.h: return error if multi platform at snd_soc_fixup_dai_links_platform_name()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Kuninori Morimoto <kuninori.morimoto.gx@xxxxxxxxxxx>

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@xxxxxxxxxxx>
---
 include/sound/soc.h | 4 ++++
 1 file changed, 4 insertions(+)

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;
 
-- 
2.25.1




[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Pulse Audio]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux