* [PATCH] ASoC: ti: omap-twl4030: Check for missing card name after parsing
@ 2026-08-05 4:45 phucduc.bui
0 siblings, 0 replies; only message in thread
From: phucduc.bui @ 2026-08-05 4:45 UTC (permalink / raw)
To: Mark Brown, Sen Wang, Liam Girdwood, Jaroslav Kysela,
Takashi Iwai, Jarkko Nikula, Andreas Kemnade, linux-omap
Cc: linux-kernel, linux-sound, bui duc phuc
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
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-08-05 4:46 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-05 4:45 [PATCH] ASoC: ti: omap-twl4030: Check for missing card name after parsing phucduc.bui
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox