From: phucduc.bui@gmail.com
To: Mark Brown <broonie@kernel.org>, Sen Wang <sen@ti.com>,
Liam Girdwood <lgirdwood@gmail.com>,
Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>,
Jarkko Nikula <jarkko.nikula@bitmer.com>,
Andreas Kemnade <andreas@kemnade.info>,
linux-omap@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, linux-sound@vger.kernel.org,
bui duc phuc <phucduc.bui@gmail.com>
Subject: [PATCH] ASoC: ti: omap-twl4030: Check for missing card name after parsing
Date: Wed, 5 Aug 2026 11:45:56 +0700 [thread overview]
Message-ID: <20260805044556.38183-1-phucduc.bui@gmail.com> (raw)
From: bui duc phuc <phucduc.bui@gmail.com>
Return any error from snd_soc_of_parse_card_name() directly. If the
helper returns successfully but card->name remains unset, report the
missing card name explicitly before returning -ENODEV.
Suggested-by: Andreas Kemnade <andreas@kemnade.info>
Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
---
sound/soc/ti/omap-twl4030.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/sound/soc/ti/omap-twl4030.c b/sound/soc/ti/omap-twl4030.c
index 8a3a792a21c6..a3ab52b2b64e 100644
--- a/sound/soc/ti/omap-twl4030.c
+++ b/sound/soc/ti/omap-twl4030.c
@@ -216,7 +216,11 @@ static int omap_twl4030_probe(struct platform_device *pdev)
if (priv == NULL)
return -ENOMEM;
- if (snd_soc_of_parse_card_name(card, "ti,model")) {
+ ret = snd_soc_of_parse_card_name(card, "ti,model");
+ if (ret)
+ return ret;
+
+ if (!card->name) {
dev_err(&pdev->dev, "Card name is not provided\n");
return -ENODEV;
}
--
2.43.0
reply other threads:[~2026-08-05 4:46 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20260805044556.38183-1-phucduc.bui@gmail.com \
--to=phucduc.bui@gmail.com \
--cc=andreas@kemnade.info \
--cc=broonie@kernel.org \
--cc=jarkko.nikula@bitmer.com \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=perex@perex.cz \
--cc=sen@ti.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