* [PATCH v3 01/10] ASoC: ti: ams-delta: Use dev_err_probe() for error handling
2026-07-16 10:39 [PATCH v3 00/10] ASoC: ti: Improve probe error handling phucduc.bui
@ 2026-07-16 10:39 ` phucduc.bui
2026-07-16 10:39 ` [PATCH v3 02/10] ASoC: ti: davinci-evm: " phucduc.bui
` (8 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: phucduc.bui @ 2026-07-16 10:39 UTC (permalink / raw)
To: Mark Brown, Sen Wang, Liam Girdwood, Jaroslav Kysela,
Takashi Iwai, Jarkko Nikula, Christophe JAILLET, linux-omap
Cc: linux-kernel, linux-sound, bui duc phuc
From: bui duc phuc <phucduc.bui@gmail.com>
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.
Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
---
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(-)
diff --git a/sound/soc/ti/ams-delta.c b/sound/soc/ti/ams-delta.c
index 61252359d5cb..2759b39c4ebe 100644
--- a/sound/soc/ti/ams-delta.c
+++ b/sound/soc/ti/ams-delta.c
@@ -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;
}
--
2.43.0
^ permalink raw reply related [flat|nested] 11+ messages in thread* [PATCH v3 02/10] ASoC: ti: davinci-evm: Use dev_err_probe() for error handling
2026-07-16 10:39 [PATCH v3 00/10] ASoC: ti: Improve probe error handling phucduc.bui
2026-07-16 10:39 ` [PATCH v3 01/10] ASoC: ti: ams-delta: Use dev_err_probe() for " phucduc.bui
@ 2026-07-16 10:39 ` phucduc.bui
2026-07-16 10:39 ` [PATCH v3 03/10] ASoC: ti: j721e-evm: Return the original error from card name parsing phucduc.bui
` (7 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: phucduc.bui @ 2026-07-16 10:39 UTC (permalink / raw)
To: Mark Brown, Sen Wang, Liam Girdwood, Jaroslav Kysela,
Takashi Iwai, Jarkko Nikula, Christophe JAILLET, linux-omap
Cc: linux-kernel, linux-sound, bui duc phuc
From: bui duc phuc <phucduc.bui@gmail.com>
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 <phucduc.bui@gmail.com>
---
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(-)
diff --git a/sound/soc/ti/davinci-evm.c b/sound/soc/ti/davinci-evm.c
index ad514c2e5a25..3156d87a3a12 100644
--- a/sound/soc/ti/davinci-evm.c
+++ b/sound/soc/ti/davinci-evm.c
@@ -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;
}
--
2.43.0
^ permalink raw reply related [flat|nested] 11+ messages in thread* [PATCH v3 03/10] ASoC: ti: j721e-evm: Return the original error from card name parsing
2026-07-16 10:39 [PATCH v3 00/10] ASoC: ti: Improve probe error handling phucduc.bui
2026-07-16 10:39 ` [PATCH v3 01/10] ASoC: ti: ams-delta: Use dev_err_probe() for " phucduc.bui
2026-07-16 10:39 ` [PATCH v3 02/10] ASoC: ti: davinci-evm: " phucduc.bui
@ 2026-07-16 10:39 ` phucduc.bui
2026-07-16 10:39 ` [PATCH v3 04/10] ASoC: ti: omap-abe-twl6040: Preserve error code and drop redundant log phucduc.bui
` (6 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: phucduc.bui @ 2026-07-16 10:39 UTC (permalink / raw)
To: Mark Brown, Sen Wang, Liam Girdwood, Jaroslav Kysela,
Takashi Iwai, Jarkko Nikula, Christophe JAILLET, linux-omap
Cc: linux-kernel, linux-sound, bui duc phuc
From: bui duc phuc <phucduc.bui@gmail.com>
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().
Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
---
sound/soc/ti/j721e-evm.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/sound/soc/ti/j721e-evm.c b/sound/soc/ti/j721e-evm.c
index 312298e0b004..600897a3e1c5 100644
--- a/sound/soc/ti/j721e-evm.c
+++ b/sound/soc/ti/j721e-evm.c
@@ -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;
--
2.43.0
^ permalink raw reply related [flat|nested] 11+ messages in thread* [PATCH v3 04/10] ASoC: ti: omap-abe-twl6040: Preserve error code and drop redundant log
2026-07-16 10:39 [PATCH v3 00/10] ASoC: ti: Improve probe error handling phucduc.bui
` (2 preceding siblings ...)
2026-07-16 10:39 ` [PATCH v3 03/10] ASoC: ti: j721e-evm: Return the original error from card name parsing phucduc.bui
@ 2026-07-16 10:39 ` phucduc.bui
2026-07-16 10:39 ` [PATCH v3 05/10] ASoC: ti: omap-abe-twl6040: Use dev_err_probe() for error handling phucduc.bui
` (5 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: phucduc.bui @ 2026-07-16 10:39 UTC (permalink / raw)
To: Mark Brown, Sen Wang, Liam Girdwood, Jaroslav Kysela,
Takashi Iwai, Jarkko Nikula, Christophe JAILLET, linux-omap
Cc: linux-kernel, linux-sound, bui duc phuc
From: bui duc phuc <phucduc.bui@gmail.com>
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 <phucduc.bui@gmail.com>
---
sound/soc/ti/omap-abe-twl6040.c | 11 ++++-------
1 file changed, 4 insertions(+), 7 deletions(-)
diff --git a/sound/soc/ti/omap-abe-twl6040.c b/sound/soc/ti/omap-abe-twl6040.c
index 56aa4b22083b..dfa931071d81 100644
--- a/sound/soc/ti/omap-abe-twl6040.c
+++ b/sound/soc/ti/omap-abe-twl6040.c
@@ -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) {
--
2.43.0
^ permalink raw reply related [flat|nested] 11+ messages in thread* [PATCH v3 05/10] ASoC: ti: omap-abe-twl6040: Use dev_err_probe() for error handling
2026-07-16 10:39 [PATCH v3 00/10] ASoC: ti: Improve probe error handling phucduc.bui
` (3 preceding siblings ...)
2026-07-16 10:39 ` [PATCH v3 04/10] ASoC: ti: omap-abe-twl6040: Preserve error code and drop redundant log phucduc.bui
@ 2026-07-16 10:39 ` phucduc.bui
2026-07-16 10:39 ` [PATCH v3 06/10] ASoC: ti: omap-dmic: " phucduc.bui
` (4 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: phucduc.bui @ 2026-07-16 10:39 UTC (permalink / raw)
To: Mark Brown, Sen Wang, Liam Girdwood, Jaroslav Kysela,
Takashi Iwai, Jarkko Nikula, Christophe JAILLET, linux-omap
Cc: linux-kernel, linux-sound, bui duc phuc
From: bui duc phuc <phucduc.bui@gmail.com>
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 <phucduc.bui@gmail.com>
---
sound/soc/ti/omap-abe-twl6040.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/sound/soc/ti/omap-abe-twl6040.c b/sound/soc/ti/omap-abe-twl6040.c
index dfa931071d81..05239ccc1f41 100644
--- a/sound/soc/ti/omap-abe-twl6040.c
+++ b/sound/soc/ti/omap-abe-twl6040.c
@@ -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;
}
--
2.43.0
^ permalink raw reply related [flat|nested] 11+ messages in thread* [PATCH v3 06/10] ASoC: ti: omap-dmic: Use dev_err_probe() for error handling
2026-07-16 10:39 [PATCH v3 00/10] ASoC: ti: Improve probe error handling phucduc.bui
` (4 preceding siblings ...)
2026-07-16 10:39 ` [PATCH v3 05/10] ASoC: ti: omap-abe-twl6040: Use dev_err_probe() for error handling phucduc.bui
@ 2026-07-16 10:39 ` phucduc.bui
2026-07-16 10:39 ` [PATCH v3 07/10] ASoC: ti: omap-hdmi: " phucduc.bui
` (3 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: phucduc.bui @ 2026-07-16 10:39 UTC (permalink / raw)
To: Mark Brown, Sen Wang, Liam Girdwood, Jaroslav Kysela,
Takashi Iwai, Jarkko Nikula, Christophe JAILLET, linux-omap
Cc: linux-kernel, linux-sound, bui duc phuc
From: bui duc phuc <phucduc.bui@gmail.com>
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.
Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
---
sound/soc/ti/omap-dmic.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/sound/soc/ti/omap-dmic.c b/sound/soc/ti/omap-dmic.c
index b795b9f66b0e..c8d791f05ae4 100644
--- a/sound/soc/ti/omap-dmic.c
+++ b/sound/soc/ti/omap-dmic.c
@@ -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) {
--
2.43.0
^ permalink raw reply related [flat|nested] 11+ messages in thread* [PATCH v3 07/10] ASoC: ti: omap-hdmi: Use dev_err_probe() for error handling
2026-07-16 10:39 [PATCH v3 00/10] ASoC: ti: Improve probe error handling phucduc.bui
` (5 preceding siblings ...)
2026-07-16 10:39 ` [PATCH v3 06/10] ASoC: ti: omap-dmic: " phucduc.bui
@ 2026-07-16 10:39 ` phucduc.bui
2026-07-16 10:39 ` [PATCH v3 08/10] ASoC: ti: omap-twl4030: Return the original error code phucduc.bui
` (2 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: phucduc.bui @ 2026-07-16 10:39 UTC (permalink / raw)
To: Mark Brown, Sen Wang, Liam Girdwood, Jaroslav Kysela,
Takashi Iwai, Jarkko Nikula, Christophe JAILLET, linux-omap
Cc: linux-kernel, linux-sound, bui duc phuc
From: bui duc phuc <phucduc.bui@gmail.com>
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 <phucduc.bui@gmail.com>
---
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(-)
diff --git a/sound/soc/ti/omap-hdmi.c b/sound/soc/ti/omap-hdmi.c
index e60f5b483fc5..1e3a9711e70c 100644
--- a/sound/soc/ti/omap-hdmi.c
+++ b/sound/soc/ti/omap-hdmi.c
@@ -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);
--
2.43.0
^ permalink raw reply related [flat|nested] 11+ messages in thread* [PATCH v3 08/10] ASoC: ti: omap-twl4030: Return the original error code
2026-07-16 10:39 [PATCH v3 00/10] ASoC: ti: Improve probe error handling phucduc.bui
` (6 preceding siblings ...)
2026-07-16 10:39 ` [PATCH v3 07/10] ASoC: ti: omap-hdmi: " phucduc.bui
@ 2026-07-16 10:39 ` phucduc.bui
2026-07-16 10:39 ` [PATCH v3 09/10] ASoC: ti: omap-twl4030: Use dev_err_probe() for error handling phucduc.bui
2026-07-16 10:39 ` [PATCH v3 10/10] ASoC: ti: rx51: " phucduc.bui
9 siblings, 0 replies; 11+ messages in thread
From: phucduc.bui @ 2026-07-16 10:39 UTC (permalink / raw)
To: Mark Brown, Sen Wang, Liam Girdwood, Jaroslav Kysela,
Takashi Iwai, Jarkko Nikula, Christophe JAILLET, linux-omap
Cc: linux-kernel, linux-sound, bui duc phuc
From: bui duc phuc <phucduc.bui@gmail.com>
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 <phucduc.bui@gmail.com>
---
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;
dai_node = of_parse_phandle(node, "ti,mcbsp", 0);
if (!dai_node) {
--
2.43.0
^ permalink raw reply related [flat|nested] 11+ messages in thread* [PATCH v3 09/10] ASoC: ti: omap-twl4030: Use dev_err_probe() for error handling
2026-07-16 10:39 [PATCH v3 00/10] ASoC: ti: Improve probe error handling phucduc.bui
` (7 preceding siblings ...)
2026-07-16 10:39 ` [PATCH v3 08/10] ASoC: ti: omap-twl4030: Return the original error code phucduc.bui
@ 2026-07-16 10:39 ` phucduc.bui
2026-07-16 10:39 ` [PATCH v3 10/10] ASoC: ti: rx51: " phucduc.bui
9 siblings, 0 replies; 11+ messages in thread
From: phucduc.bui @ 2026-07-16 10:39 UTC (permalink / raw)
To: Mark Brown, Sen Wang, Liam Girdwood, Jaroslav Kysela,
Takashi Iwai, Jarkko Nikula, Christophe JAILLET, linux-omap
Cc: linux-kernel, linux-sound, bui duc phuc
From: bui duc phuc <phucduc.bui@gmail.com>
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 <phucduc.bui@gmail.com>
---
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;
}
--
2.43.0
^ permalink raw reply related [flat|nested] 11+ messages in thread* [PATCH v3 10/10] ASoC: ti: rx51: Use dev_err_probe() for error handling
2026-07-16 10:39 [PATCH v3 00/10] ASoC: ti: Improve probe error handling phucduc.bui
` (8 preceding siblings ...)
2026-07-16 10:39 ` [PATCH v3 09/10] ASoC: ti: omap-twl4030: Use dev_err_probe() for error handling phucduc.bui
@ 2026-07-16 10:39 ` phucduc.bui
9 siblings, 0 replies; 11+ messages in thread
From: phucduc.bui @ 2026-07-16 10:39 UTC (permalink / raw)
To: Mark Brown, Sen Wang, Liam Girdwood, Jaroslav Kysela,
Takashi Iwai, Jarkko Nikula, Christophe JAILLET, linux-omap
Cc: linux-kernel, linux-sound, bui duc phuc
From: bui duc phuc <phucduc.bui@gmail.com>
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.
Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
---
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(-)
diff --git a/sound/soc/ti/rx51.c b/sound/soc/ti/rx51.c
index cfc23e0838c2..b13faf162c75 100644
--- a/sound/soc/ti/rx51.c
+++ b/sound/soc/ti/rx51.c
@@ -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;
}
--
2.43.0
^ permalink raw reply related [flat|nested] 11+ messages in thread