From: Marcel Ziswiler <marcel@ziswiler.com>
To: alsa-devel@alsa-project.org, linux-tegra@vger.kernel.org,
linux-kernel@vger.kernel.org
Cc: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>,
Marcel Ziswiler <marcel.ziswiler@toradex.com>,
Liam Girdwood <lgirdwood@gmail.com>,
Takashi Iwai <tiwai@suse.com>, Mark Brown <broonie@kernel.org>
Subject: [PATCH v1 3/3] ASoC: soc-core: fix platform name vs. of_node assignement
Date: Thu, 18 Oct 2018 13:18:29 +0200 [thread overview]
Message-ID: <20181018111829.27056-4-marcel@ziswiler.com> (raw)
In-Reply-To: <20181018111829.27056-1-marcel@ziswiler.com>
From: Marcel Ziswiler <marcel.ziswiler@toradex.com>
This fixes the following error as seen post commit daecf46ee0e5
("ASoC: soc-core: use snd_soc_dai_link_component for platform") on
Apalis TK1 after initial probe deferral:
tegra-snd-sgtl5000 sound: ASoC: Both platform name/of_node are set for
sgtl5000
tegra-snd-sgtl5000 sound: ASoC: failed to init link sgtl5000
tegra-snd-sgtl5000 sound: snd_soc_register_card failed (-22)
tegra-snd-sgtl5000: probe of sound failed with error -22
Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
---
Changes in v1:
- Split from the Tegra series as suggested by Mark.
- Fix issue in soc-core rather than working around it in tegra_sgtl5000.
sound/soc/soc-core.c | 16 +++++++++++++---
1 file changed, 13 insertions(+), 3 deletions(-)
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index 6ddcf12bc030..b97624005976 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -2733,7 +2733,7 @@ static int snd_soc_bind_card(struct snd_soc_card *card)
int snd_soc_register_card(struct snd_soc_card *card)
{
int i, ret;
- struct snd_soc_dai_link *link;
+ struct snd_soc_dai_link *link = NULL;
if (!card->name || !card->dev)
return -EINVAL;
@@ -2744,7 +2744,7 @@ int snd_soc_register_card(struct snd_soc_card *card)
if (ret) {
dev_err(card->dev, "ASoC: failed to init link %s\n",
link->name);
- return ret;
+ goto err;
}
}
@@ -2763,7 +2763,17 @@ int snd_soc_register_card(struct snd_soc_card *card)
mutex_init(&card->mutex);
mutex_init(&card->dapm_mutex);
- return snd_soc_bind_card(card);
+ ret = snd_soc_bind_card(card);
+ if (ret)
+ goto err;
+
+ return 0;
+
+err:
+ if (link && link->platform)
+ link->platform = NULL;
+
+ return ret;
}
EXPORT_SYMBOL_GPL(snd_soc_register_card);
--
2.14.4
next prev parent reply other threads:[~2018-10-18 11:19 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-18 11:18 [PATCH v1 0/3] ASoC: last minute fixes Marcel Ziswiler
2018-10-18 11:18 ` [PATCH v1 1/3] ASoC: tegra_sgtl5000: fix device_node refcounting Marcel Ziswiler
2018-10-18 11:18 ` [PATCH v1 2/3] ASoC: soc-core: fix trivial checkpatch issues Marcel Ziswiler
2018-10-19 12:26 ` Applied "ASoC: soc-core: fix trivial checkpatch issues" to the asoc tree Mark Brown
2018-10-19 12:34 ` Mark Brown
2018-10-18 11:18 ` Marcel Ziswiler [this message]
2018-10-19 10:22 ` [PATCH v1 3/3] ASoC: soc-core: fix platform name vs. of_node assignement Jon Hunter
2018-10-21 11:23 ` Mark Brown
2018-12-18 17:40 ` Matthias Reichl
2019-01-03 16:42 ` [alsa-devel] " Jon Hunter
2019-01-08 2:25 ` Kuninori Morimoto
2019-01-08 10:50 ` Jon Hunter
2019-01-08 12:03 ` [alsa-devel] " Jon Hunter
2019-01-08 15:48 ` Jon Hunter
2019-01-08 16:09 ` Mark Brown
2019-01-09 1:51 ` [alsa-devel] " Kuninori Morimoto
2019-01-09 11:03 ` Jon Hunter
2019-01-09 12:53 ` Mark Brown
2019-01-09 14:11 ` [alsa-devel] " Jon Hunter
2019-01-09 14:14 ` Mark Brown
2019-01-10 1:16 ` [alsa-devel] " Kuninori Morimoto
2019-01-10 3:46 ` Kuninori Morimoto
2019-01-10 10:56 ` Jon Hunter
2019-01-11 0:52 ` Kuninori Morimoto
2019-01-11 8:41 ` [alsa-devel] " Jon Hunter
2019-01-11 8:51 ` Kuninori Morimoto
2019-01-11 9:15 ` Jon Hunter
2019-01-14 23:02 ` Mark Brown
2019-01-15 15:26 ` [alsa-devel] " Jon Hunter
2019-01-15 18:07 ` Matthias Reichl
2019-01-08 15:33 ` Mark Brown
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20181018111829.27056-4-marcel@ziswiler.com \
--to=marcel@ziswiler.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=kuninori.morimoto.gx@renesas.com \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tegra@vger.kernel.org \
--cc=marcel.ziswiler@toradex.com \
--cc=tiwai@suse.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).