Merge branch 'for-5.6' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie...
[linux-2.6-microblaze.git] / sound / soc / soc-core.c
index 4e0f555..e7e70b4 100644 (file)
@@ -1260,8 +1260,18 @@ static int soc_probe_component(struct snd_soc_card *card,
        ret = snd_soc_dapm_add_routes(dapm,
                                      component->driver->dapm_routes,
                                      component->driver->num_dapm_routes);
-       if (ret < 0)
-               goto err_probe;
+       if (ret < 0) {
+               if (card->disable_route_checks) {
+                       dev_info(card->dev,
+                                "%s: disable_route_checks set, ignoring errors on add_routes\n",
+                                __func__);
+               } else {
+                       dev_err(card->dev,
+                               "%s: snd_soc_dapm_add_routes failed: %d\n",
+                               __func__, ret);
+                       goto err_probe;
+               }
+       }
 
        /* see for_each_card_components */
        list_add(&component->card_list, &card->component_dev_list);
@@ -1948,8 +1958,18 @@ static int snd_soc_bind_card(struct snd_soc_card *card)
 
        ret = snd_soc_dapm_add_routes(&card->dapm, card->dapm_routes,
                                      card->num_dapm_routes);
-       if (ret < 0)
-               goto probe_end;
+       if (ret < 0) {
+               if (card->disable_route_checks) {
+                       dev_info(card->dev,
+                                "%s: disable_route_checks set, ignoring errors on add_routes\n",
+                                __func__);
+               } else {
+                       dev_err(card->dev,
+                                "%s: snd_soc_dapm_add_routes failed: %d\n",
+                                __func__, ret);
+                       goto probe_end;
+               }
+       }
 
        ret = snd_soc_dapm_add_routes(&card->dapm, card->of_dapm_routes,
                                      card->num_of_dapm_routes);