From: Kuninori Morimoto Date: Tue, 10 Dec 2019 00:34:40 +0000 (+0900) Subject: ASoC: soc-core: add missing return value check for soc_link_init() X-Git-Tag: v5.15~2585^2~265^2~272 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=626c2e57a33a7565af03b2eb95989c43be651a03;p=platform%2Fkernel%2Flinux-starfive.git 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 Reviewed-by: Ranjani Sridharan Reviewed-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/87zhg1xbkv.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown --- diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c index 04cb690..2af3df5 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);