aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKuninori Morimoto <[email protected]>2019-12-10 09:34:40 +0900
committerMark Brown <[email protected]>2019-12-10 13:18:05 +0000
commit626c2e57a33a7565af03b2eb95989c43be651a03 (patch)
treede85b8792e1861b80dec0b5f0c74a70936903fbd
parent46496acbe1c43cd26f5515b51b5d3c46a97d785d (diff)
ASoC: soc-core: add missing return value check for soc_link_init()
soc_link_init() returns error code, but snd_soc_bind_card() is not cheking it. This patch adds missing return value check for it. Signed-off-by: Kuninori Morimoto <[email protected]> Reviewed-by: Ranjani Sridharan <[email protected]> Reviewed-by: Pierre-Louis Bossart <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
-rw-r--r--sound/soc/soc-core.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index 04cb69072f80..2af3df5d0d72 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -1983,8 +1983,11 @@ static int snd_soc_bind_card(struct snd_soc_card *card)
goto probe_end;
}
- for_each_card_rtds(card, rtd)
- soc_link_init(card, rtd);
+ for_each_card_rtds(card, rtd) {
+ ret = soc_link_init(card, rtd);
+ if (ret < 0)
+ goto probe_end;
+ }
snd_soc_dapm_link_dai_widgets(card);
snd_soc_dapm_connect_dai_link_widgets(card);