Commit 5b99a0aa authored by Kuninori Morimoto's avatar Kuninori Morimoto Committed by Mark Brown

ASoC: soc-core: check return value of snd_soc_add_dai_link()

snd_soc_add_dai_link() might return error, we need to check it.
Signed-off-by: default avatarKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87k1bpahpd.wl-kuninori.morimoto.gx@renesas.comReviewed-by: default avatarRanjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 6634e3d6
...@@ -1964,8 +1964,11 @@ static int snd_soc_instantiate_card(struct snd_soc_card *card) ...@@ -1964,8 +1964,11 @@ static int snd_soc_instantiate_card(struct snd_soc_card *card)
} }
/* add predefined DAI links to the list */ /* add predefined DAI links to the list */
for_each_card_prelinks(card, i, dai_link) for_each_card_prelinks(card, i, dai_link) {
snd_soc_add_dai_link(card, dai_link); ret = snd_soc_add_dai_link(card, dai_link);
if (ret < 0)
goto probe_end;
}
/* card bind complete so register a sound card */ /* card bind complete so register a sound card */
ret = snd_card_new(card->dev, SNDRV_DEFAULT_IDX1, SNDRV_DEFAULT_STR1, ret = snd_card_new(card->dev, SNDRV_DEFAULT_IDX1, SNDRV_DEFAULT_STR1,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment