Like cpus and platforms, defer sound card initialization if the codec
component is missing when initializing the dai_link
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
                                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;
        }
 
        /*