Revert "ASoC: Fail card instantiation if DAI format setup fails" [Linux 4.19.70]

This Linux kernel change "Revert “ASoC: Fail card instantiation if DAI format setup fails”" is included in the Linux 4.19.70 release. This change is authored by Greg Kroah-Hartman <gregkh [at] linuxfoundation.org> on Thu Sep 5 20:48:46 2019 +0200. The commit for this change in Linux stable tree is 9854d08 (patch).

Revert "ASoC: Fail card instantiation if DAI format setup fails"

This reverts commit 714a8438fc8ae88aa22c25065e241bce0260db13 which is
commit 40aa5383e393d72f6aa3943a4e7b1aae25a1e43b upstream.

Mark Brown writes:
    I nacked this patch when Sasha posted it - it only improves
    diagnostics and might make systems that worked by accident break
    since it turns things into a hard failure, it won't make
    anything that didn't work previously work.

Reported-by: Mark Brown <broonie@kernel.org>
Cc: Ricard Wanderlof <ricardw@axis.com>
Cc: Sasha Levin <sashal@kernel.org>
Link: https://lore.kernel.org/lkml/20190904181027.GG4348@sirena.co.uk
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

There are 7 lines of Linux source code added/deleted in this change. Code changes to Linux kernel are as follows.

 sound/soc/soc-core.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index dafc3b7..62aa320 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -1513,11 +1513,8 @@ static int soc_probe_link_dais(struct snd_soc_card *card,
        }
    }

-   if (dai_link->dai_fmt) {
-       ret = snd_soc_runtime_set_dai_fmt(rtd, dai_link->dai_fmt);
-       if (ret)
-           return ret;
-   }
+   if (dai_link->dai_fmt)
+       snd_soc_runtime_set_dai_fmt(rtd, dai_link->dai_fmt);

    ret = soc_post_component_init(rtd, dai_link->name);
    if (ret)

Leave a Reply

Your email address will not be published. Required fields are marked *