Re: [PATCH 09/10] ASoC: ti: omap-twl4030: Use dev_err_probe() for error handling

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

> From: bui duc phuc <[email protected]>
> 
> Replace dev_err() with dev_err_probe() when reporting
> devm_snd_soc_register_card() failures. This suppresses
> unnecessary log messages for deferred probe errors.
> 
> Signed-off-by: bui duc phuc <[email protected]>

Reviewed-by: Andreas Kemnade <[email protected]>

> ---
>  sound/soc/ti/omap-twl4030.c | 8 +++-----
>  1 file changed, 3 insertions(+), 5 deletions(-)
> 
> diff --git a/sound/soc/ti/omap-twl4030.c b/sound/soc/ti/omap-twl4030.c
> index 2a80e44035d7..576f4d3615e8 100644
> --- a/sound/soc/ti/omap-twl4030.c
> +++ b/sound/soc/ti/omap-twl4030.c
> @@ -306,11 +306,9 @@ static int omap_twl4030_probe(struct platform_device *pdev)
>  
>  	snd_soc_card_set_drvdata(card, priv);
>  	ret = devm_snd_soc_register_card(&pdev->dev, card);
> -	if (ret) {
> -		dev_err(&pdev->dev, "devm_snd_soc_register_card() failed: %d\n",
> -			ret);
> -		return ret;
> -	}
> +	if (ret)
> +		return dev_err_probe(&pdev->dev, ret,
> +				     "devm_snd_soc_register_card() failed\n");
>  
>  	return 0;
>  }
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.