ASoC: ti: Improve probe error handling
Subsystems (4)
v3 cover ASoC: ti: Improve probe error handling
From: bui duc phuc <[email protected]>
Hi all,
This series cleans up probe error handling across several TI ASoC drivers.
The changes fall into two categories:
1.Replace dev_err() with dev_err_probe() when reporting probe
failures. This preserves the original error code while suppressing unnecessary log messages for deferred probe errors.
2.Preserve the original error codes returned by helper functions
instead of converting them to -ENODEV, and remove redundant error messages where the helper already reports the failure.
Build-tested only.
Changes in v2:
- Add missing parentheses to snd_soc_register_card() (Christophe).
- Remove an extra blank line (Christophe).
Changes in v3:
- Add the remaining missing parentheses to snd_soc_register_card() (Cezary).
Best regards,
Phuc
bui duc phuc (10):
ASoC: ti: ams-delta: Use dev_err_probe() for error handling
ASoC: ti: davinci-evm: Use dev_err_probe() for error handling
ASoC: ti: j721e-evm: Return the original error from card name parsing
ASoC: ti: omap-abe-twl6040: Preserve error code and drop redundant log
ASoC: ti: omap-abe-twl6040: Use dev_err_probe() for error handling
ASoC: ti: omap-dmic: Use dev_err_probe() for error handling
ASoC: ti: omap-hdmi: Use dev_err_probe() for error handling
ASoC: ti: omap-twl4030: Return the original error code
ASoC: ti: omap-twl4030: Use dev_err_probe() for error handling
ASoC: ti: rx51: Use dev_err_probe() for error handling
sound/soc/ti/ams-delta.c | 4 ++-- sound/soc/ti/davinci-evm.c | 3 +-- sound/soc/ti/j721e-evm.c | 7 +++---- sound/soc/ti/omap-abe-twl6040.c | 15 ++++++--------- sound/soc/ti/omap-dmic.c | 7 +++---- sound/soc/ti/omap-hdmi.c | 6 ++---- sound/soc/ti/omap-twl4030.c | 15 ++++++--------- sound/soc/ti/rx51.c | 28 ++++++++++++---------------- 8 files changed, 35 insertions(+), 50 deletions(-)
Signature · 1 line
2.43.0
PATCH v3 1/10 ASoC: ti: ams-delta: Use dev_err_probe() for error handling
From: bui duc phuc <[email protected]>
Use dev_err_probe() to replace dev_err() followed by returning the error code. This keeps the error handling concise and suppresses log messages for deferred probe errors.
---
Changes in v2:
- Add missing parentheses to snd_soc_register_card() (Christophe).
sound/soc/ti/ams-delta.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
sound/soc/ti/ams-delta.c +2 -2
@@ -574,9 +574,9 @@ static int ams_delta_probe(struct platform_device *pdev) ret =snd_soc_register_card (card);if (ret) { -dev_err (&pdev->dev,"snd_soc_register_card failed (%d)\n" , ret); card->dev =NULL ; -return ret; +return dev_err_probe (&pdev->dev, ret, +"snd_soc_register_card() failed\n" ); }return 0 ; }
Signature · 1 line
2.43.0
PATCH v3 2/10 ASoC: ti: davinci-evm: Use dev_err_probe() for error handling
In reply to [email protected]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.
---
Changes in v2:
- Add missing parentheses to snd_soc_register_card() (Christophe).
- Remove an extra blank line (Christophe).
sound/soc/ti/davinci-evm.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
sound/soc/ti/davinci-evm.c +1 -2
@@ -245,9 +245,8 @@ static int davinci_evm_probe(struct platform_device *pdev)snd_soc_card_set_drvdata (&evm_soc_card, drvdata); ret =devm_snd_soc_register_card (&pdev->dev, &evm_soc_card); -if (ret) { -dev_err (&pdev->dev,"snd_soc_register_card failed (%d)\n" , ret); +dev_err_probe (&pdev->dev, ret,"snd_soc_register_card() failed\n" ); goto err_put; }
Signature · 1 line
2.43.0
PATCH v3 3/10 ASoC: ti: j721e-evm: Return the original error from card name parsing
In reply to [email protected]From: bui duc phuc <[email protected]>
Return the error from snd_soc_of_parse_card_name() directly instead of converting it to -ENODEV. The helper already logs the error, so drop the redundant dev_err().
--- sound/soc/ti/j721e-evm.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)
sound/soc/ti/j721e-evm.c +3 -4
@@ -870,10 +870,9 @@ static int j721e_soc_probe(struct platform_device *pdev) card->num_dapm_routes =ARRAY_SIZE (j721e_cpb_dapm_routes); card->fully_routed =1 ; -if (snd_soc_of_parse_card_name (card,"model" )) { -dev_err (&pdev->dev,"Card name is not provided\n" ); -return -ENODEV ; - } + ret =snd_soc_of_parse_card_name (card,"model" ); +if (ret) +return ret; link_cnt =0 ; conf_cnt =0 ;
Signature · 1 line
2.43.0
PATCH v3 4/10 ASoC: ti: omap-abe-twl6040: Preserve error code and drop redundant log
In reply to [email protected]From: bui duc phuc <[email protected]>
Return the original errors from the OF parsing helpers and remove the redundant error messages, as the helpers already report failures.
--- sound/soc/ti/omap-abe-twl6040.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-)
sound/soc/ti/omap-abe-twl6040.c +4 -7
@@ -234,16 +234,13 @@ static int omap_abe_probe(struct platform_device *pdev) card->dapm_routes = audio_map; card->num_dapm_routes =ARRAY_SIZE (audio_map); -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; ret =snd_soc_of_parse_audio_routing (card,"ti,audio-routing" ); -if (ret) { -dev_err (&pdev->dev,"Error while parsing DAPM routing\n" ); +if (ret)return ret; - } dai_node =of_parse_phandle (node,"ti,mcpdm" ,0 );if (!dai_node) {
Signature · 1 line
2.43.0
Re: [PATCH v3 04/10] ASoC: ti: omap-abe-twl6040: Preserve error code and drop redundant log
Quoted 9 lines · On 16/07/2026 1:39 pm, [email protected] wrote:
From: bui duc phuc <[email protected]>
Return the original errors from the OF parsing helpers and remove the redundant error messages, as the helpers already report failures.
Signed-off-by bui duc phuc <[email protected]>--- sound/soc/ti/omap-abe-twl6040.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-)
PATCH v3 5/10 ASoC: ti: omap-abe-twl6040: Use dev_err_probe() for error handling
In reply to [email protected]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.
--- sound/soc/ti/omap-abe-twl6040.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
sound/soc/ti/omap-abe-twl6040.c +2 -2
@@ -296,8 +296,8 @@ static int omap_abe_probe(struct platform_device *pdev) ret =devm_snd_soc_register_card (&pdev->dev, card);if (ret) -dev_err (&pdev->dev,"devm_snd_soc_register_card() failed: %d\n" , - ret); +dev_err_probe (&pdev->dev, ret, +"devm_snd_soc_register_card() failed\n" );return ret; }
Signature · 1 line
2.43.0
Re: [PATCH v3 05/10] ASoC: ti: omap-abe-twl6040: Use dev_err_probe() for error handling
Quoted 10 lines · On 16/07/2026 1:39 pm, [email protected] wrote:
From: bui duc phuc <[email protected]>
Replace
dev_err()withdev_err_probe()when reportingdevm_snd_soc_register_card()failures. This suppresses unnecessary log messages for deferred probe errors.Signed-off-by bui duc phuc <[email protected]>--- sound/soc/ti/omap-abe-twl6040.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
PATCH v3 6/10 ASoC: ti: omap-dmic: Use dev_err_probe() for error handling
In reply to [email protected]From: bui duc phuc <[email protected]>
Replace dev_err() with dev_err_probe() when handling clock lookup failures. This preserves the original error code and suppresses unnecessary deferred probe error messages.
--- sound/soc/ti/omap-dmic.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)
sound/soc/ti/omap-dmic.c +3 -4
@@ -465,10 +465,9 @@ static int asoc_dmic_probe(struct platform_device *pdev)mutex_init (&dmic->mutex); dmic->fclk =devm_clk_get (dmic->dev,"fck" ); -if (IS_ERR (dmic->fclk)) { -dev_err (dmic->dev,"can't get fck\n" ); -return -ENODEV ; - } +if (IS_ERR (dmic->fclk)) +return dev_err_probe (dmic->dev,PTR_ERR (dmic->fclk), +"can't get fck\n" ); res =platform_get_resource_byname (pdev,IORESOURCE_MEM ,"dma" );if (!res) {
Signature · 1 line
2.43.0
Re: [PATCH v3 06/10] ASoC: ti: omap-dmic: Use dev_err_probe() for error handling
Quoted 10 lines · On 16/07/2026 1:39 pm, [email protected] wrote:
From: bui duc phuc <[email protected]>
Replace
dev_err()withdev_err_probe()when handling clock lookup failures. This preserves the original error code and suppresses unnecessary deferred probe error messages.Signed-off-by bui duc phuc <[email protected]>--- sound/soc/ti/omap-dmic.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)
PATCH v3 7/10 ASoC: ti: omap-hdmi: Use dev_err_probe() for error handling
In reply to [email protected]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.
---
Changes in v3:
- Add the remaining missing parentheses to snd_soc_register_card() (Cezary).
sound/soc/ti/omap-hdmi.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)
sound/soc/ti/omap-hdmi.c +2 -4
@@ -375,10 +375,8 @@ static int omap_hdmi_audio_probe(struct platform_device *pdev) card->dev = dev; ret =devm_snd_soc_register_card (dev, card); -if (ret) { -dev_err (dev,"snd_soc_register_card failed (%d)\n" , ret); -return ret; - } +if (ret) +return dev_err_probe (dev, ret,"snd_soc_register_card() failed\n" ); ad->card = card;snd_soc_card_set_drvdata (card, ad);
Signature · 1 line
2.43.0
Re: [PATCH v3 07/10] ASoC: ti: omap-hdmi: Use dev_err_probe() for error handling
Quoted 7 lines · On 16/07/2026 1:39 pm, [email protected] wrote:
From: bui duc phuc <[email protected]>
Replace
dev_err()withdev_err_probe()when reportingdevm_snd_soc_register_card()failures. This suppresses unnecessary log messages for deferred probe errors.Signed-off-by bui duc phuc <[email protected]>
Quoted 8 lines
---
Changes in v3:
- Add the remaining missing parentheses tosnd_soc_register_card()(Cezary).sound/soc/ti/omap-hdmi.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)
PATCH v3 8/10 ASoC: ti: omap-twl4030: Return the original error code
In reply to [email protected]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.
--- sound/soc/ti/omap-twl4030.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)
sound/soc/ti/omap-twl4030.c +3 -4
@@ -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; dai_node =of_parse_phandle (node,"ti,mcbsp" ,0 );if (!dai_node) {
Signature · 1 line
2.43.0
Re: [PATCH v3 08/10] ASoC: ti: omap-twl4030: Return the original error code
Quoted 9 lines · On 16/07/2026 1:39 pm, [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(-)
PATCH v3 9/10 ASoC: ti: omap-twl4030: Use dev_err_probe() for error handling
In reply to [email protected]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.
--- sound/soc/ti/omap-twl4030.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-)
sound/soc/ti/omap-twl4030.c +3 -5
@@ -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 ; }
Signature · 1 line
2.43.0
Re: [PATCH v3 09/10] ASoC: ti: omap-twl4030: Use dev_err_probe() for error handling
Quoted 10 lines · On 16/07/2026 1:39 pm, [email protected] wrote:
From: bui duc phuc <[email protected]>
Replace
dev_err()withdev_err_probe()when reportingdevm_snd_soc_register_card()failures. This suppresses unnecessary log messages for deferred probe errors.Signed-off-by bui duc phuc <[email protected]>--- sound/soc/ti/omap-twl4030.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-)
PATCH v3 10/10 ASoC: ti: rx51: Use dev_err_probe() for error handling
In reply to [email protected]From: bui duc phuc <[email protected]>
Replace dev_err() with dev_err_probe() when reporting probe failures. This preserves the original error code and suppresses unnecessary log messages for deferred probe errors.
---
Changes in v3:
- Add the remaining missing parentheses to snd_soc_register_card() (Cezary).
sound/soc/ti/rx51.c | 28 ++++++++++++---------------- 1 file changed, 12 insertions(+), 16 deletions(-)
sound/soc/ti/rx51.c +12 -16
@@ -418,31 +418,27 @@ static int rx51_soc_probe(struct platform_device *pdev) pdata->tvout_selection_gpio =devm_gpiod_get (card->dev,"tvout-selection" ,GPIOD_OUT_LOW ); -if (IS_ERR (pdata->tvout_selection_gpio)) { -dev_err (card->dev,"could not get tvout selection gpio\n" ); -return PTR_ERR (pdata->tvout_selection_gpio); - } +if (IS_ERR (pdata->tvout_selection_gpio)) +return dev_err_probe (card->dev,PTR_ERR (pdata->tvout_selection_gpio), +"could not get tvout selection gpio\n" ); pdata->eci_sw_gpio =devm_gpiod_get (card->dev,"eci-switch" ,GPIOD_OUT_HIGH ); -if (IS_ERR (pdata->eci_sw_gpio)) { -dev_err (card->dev,"could not get eci switch gpio\n" ); -return PTR_ERR (pdata->eci_sw_gpio); - } +if (IS_ERR (pdata->eci_sw_gpio)) +return dev_err_probe (card->dev,PTR_ERR (pdata->eci_sw_gpio), +"could not get eci switch gpio\n" ); pdata->speaker_amp_gpio =devm_gpiod_get (card->dev,"speaker-amplifier" ,GPIOD_OUT_LOW ); -if (IS_ERR (pdata->speaker_amp_gpio)) { -dev_err (card->dev,"could not get speaker enable gpio\n" ); -return PTR_ERR (pdata->speaker_amp_gpio); - } +if (IS_ERR (pdata->speaker_amp_gpio)) +return dev_err_probe (card->dev,PTR_ERR (pdata->speaker_amp_gpio), +"could not get speaker enable gpio\n" ); err =devm_snd_soc_register_card (card->dev, card); -if (err) { -dev_err (card->dev,"snd_soc_register_card failed (%d)\n" , err); -return err; - } +if (err) +return dev_err_probe (card->dev, err, +"snd_soc_register_card() failed\n" );return 0 ; }
Signature · 1 line
2.43.0
Re: [PATCH v3 10/10] ASoC: ti: rx51: Use dev_err_probe() for error handling
Quoted 7 lines · On 16/07/2026 1:39 pm, [email protected] wrote:
From: bui duc phuc <[email protected]>
Replace
dev_err()withdev_err_probe()when reporting probe failures. This preserves the original error code and suppresses unnecessary log messages for deferred probe errors.Signed-off-by bui duc phuc <[email protected]>
Quoted 8 lines
---
Changes in v3:
- Add the remaining missing parentheses tosnd_soc_register_card()(Cezary).sound/soc/ti/rx51.c | 28 ++++++++++++---------------- 1 file changed, 12 insertions(+), 16 deletions(-)
Mark Brown
maintainerQuoted 10 lines · On Thu, 16 Jul 2026 17:39:01 +0700, [email protected] wrote:
ASoC: ti: Improve probe error handling
From: bui duc phuc <[email protected]>
Hi all,
This series cleans up probe error handling across several TI ASoC drivers.
[...]
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-7.3
Thanks!
[01/10] ASoC: ti: ams-delta: Use dev_err_probe() for error handling
https://git.kernel.org/broonie/sound/c/5413fb3ba54c [02/10] ASoC: ti: davinci-evm: Use dev_err_probe() for error handling https://git.kernel.org/broonie/sound/c/7ae5829ab0f2 [03/10] ASoC: ti: j721e-evm: Return the original error from card name parsing https://git.kernel.org/broonie/sound/c/1a1145d1b249 [04/10] ASoC: ti: omap-abe-twl6040: Preserve error code and drop redundant log https://git.kernel.org/broonie/sound/c/e0b2ab952d19 [05/10] ASoC: ti: omap-abe-twl6040: Use dev_err_probe() for error handling https://git.kernel.org/broonie/sound/c/3e8b2361c651 [06/10] ASoC: ti: omap-dmic: Use dev_err_probe() for error handling https://git.kernel.org/broonie/sound/c/fa1d248f1638 [07/10] ASoC: ti: omap-hdmi: Use dev_err_probe() for error handling https://git.kernel.org/broonie/sound/c/492a53506ab2 [08/10] ASoC: ti: omap-twl4030: Return the original error code https://git.kernel.org/broonie/sound/c/23c89b7d91cc [09/10] ASoC: ti: omap-twl4030: Use dev_err_probe() for error handling https://git.kernel.org/broonie/sound/c/31d9b5bc1abb [10/10] ASoC: ti: rx51: Use dev_err_probe() for error handling https://git.kernel.org/broonie/sound/c/924448b41b65
All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying to this mail.
Thanks,
Mark