linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ASoC: soc-core: Fix probe deferral following prelink failure
@ 2019-03-04 13:31 Jon Hunter
  2019-03-04 15:32 ` Applied "ASoC: soc-core: Fix probe deferral following prelink failure" to the asoc tree Mark Brown
  2019-04-01 12:22 ` [PATCH] ASoC: soc-core: Fix probe deferral following prelink failure Jon Hunter
  0 siblings, 2 replies; 10+ messages in thread
From: Jon Hunter @ 2019-03-04 13:31 UTC (permalink / raw)
  To: Liam Girdwood, Mark Brown
  Cc: alsa-devel, linux-kernel, Curtis Malainey, linux-tegra, Jonathan Hunter

From: Jonathan Hunter <jonathanh@nvidia.com>

Commit 78a24e10cd94 ("ASoC: soc-core: clear platform pointers on error")
re-worked the clean-up of any platform pointers that may have been
initialised by the function snd_soc_init_platform(). This commit missed
one error path where if any of the prelinks for a soundcard failed to
initialise, then these platform pointers would not be cleaned-up. This
then prevents the soundcard from being initialised following a probe
deferral when any of the soundcard prelinks cannot be found.

Fix this by ensuring that soc_cleanup_platform() is called when
initialising the soundcard prelinks fails.

Fixes: 78a24e10cd94 ("ASoC: soc-core: clear platform pointers on error")

Signed-off-by: Jonathan Hunter <jonathanh@nvidia.com>
---
 sound/soc/soc-core.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index 93d316d5bf8e..5a5764dba147 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -2797,6 +2797,7 @@ int snd_soc_register_card(struct snd_soc_card *card)
 
 		ret = soc_init_dai_link(card, link);
 		if (ret) {
+			soc_cleanup_platform(card);
 			dev_err(card->dev, "ASoC: failed to init link %s\n",
 				link->name);
 			mutex_unlock(&client_mutex);
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2019-04-03  3:47 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-04 13:31 [PATCH] ASoC: soc-core: Fix probe deferral following prelink failure Jon Hunter
2019-03-04 15:32 ` Applied "ASoC: soc-core: Fix probe deferral following prelink failure" to the asoc tree Mark Brown
2019-04-01 12:22 ` [PATCH] ASoC: soc-core: Fix probe deferral following prelink failure Jon Hunter
2019-04-02  4:35   ` Mark Brown
2019-04-02  8:52     ` Jon Hunter
2019-04-02  9:19       ` Mark Brown
2019-04-02  9:30         ` Jon Hunter
2019-04-02  9:31           ` Mark Brown
2019-04-02  9:44             ` Jon Hunter
2019-04-03  3:47               ` Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).