Re: [PATCH 08/10] ASoC: ti: omap-twl4030: Return the original error code

Andreas Kemnade <[email protected]>
Newsgroups org.kernel.vger.linux-omap,org.kernel.vger.linux-kernel,org.kernel.vger.linux-sound
Message-ID <[email protected]>
On Tue, 14 Jul 2026 19:00:40 +0700
[email protected] wrote:

> From: bui duc phuc <[email protected]>
> 
> Return the error from snd_soc_of_parse_card_name() directly and drop
> the redundant error message since the helper already logs the failure.
> 
> Signed-off-by: bui duc phuc <[email protected]>
> ---
>  sound/soc/ti/omap-twl4030.c | 7 +++----
>  1 file changed, 3 insertions(+), 4 deletions(-)
> 
> diff --git a/sound/soc/ti/omap-twl4030.c b/sound/soc/ti/omap-twl4030.c
> index 4d80f8a7a947..2a80e44035d7 100644
> --- a/sound/soc/ti/omap-twl4030.c
> +++ b/sound/soc/ti/omap-twl4030.c
> @@ -253,10 +253,9 @@ static int omap_twl4030_probe(struct platform_device *pdev)
>  		struct device_node *dai_node;
>  		struct property *prop;
>  
> -		if (snd_soc_of_parse_card_name(card, "ti,model")) {
> -			dev_err(&pdev->dev, "Card name is not provided\n");
> -			return -ENODEV;
> -		}
> +		ret = snd_soc_of_parse_card_name(card, "ti,model");
> +		if (ret)
> +			return ret;
>
The error message seems that is wants to catch a non-existant property. 
snd_soc_of_parse_card_name() seems to ignore that error. Which is then
really catched by devm_snd_soc_register_card(). It would be good to
point out the error explicitely, so probably printing that error message
on if (!card->name)

Regards,
Andreas
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.