Commit af18b13f authored by Jerome Brunet's avatar Jerome Brunet Committed by Mark Brown

ASoC: soc-core: defer card registration if codec component is missing

Like cpus and platforms, defer sound card initialization if the codec
component is missing when initializing the dai_link
Signed-off-by: default avatarJerome Brunet <jbrunet@baylibre.com>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 8af6b229
......@@ -1071,12 +1071,20 @@ static int soc_init_dai_link(struct snd_soc_card *card,
link->name);
return -EINVAL;
}
/* Codec DAI name must be specified */
if (!codec->dai_name) {
dev_err(card->dev, "ASoC: codec_dai_name not set for %s\n",
link->name);
return -EINVAL;
}
/*
* Defer card registration if codec component is not added to
* component list.
*/
if (!soc_find_component(codec))
return -EPROBE_DEFER;
}
/*
......
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