Linux Sound subsystem development
 help / color / mirror / Atom feed
* [PATCH v2 00/10] ASoC: ti: Improve probe error handling
@ 2026-07-16  9:08 phucduc.bui
  2026-07-16  9:08 ` [PATCH v2 01/10] ASoC: ti: ams-delta: Use dev_err_probe() for " phucduc.bui
                   ` (9 more replies)
  0 siblings, 10 replies; 17+ messages in thread
From: phucduc.bui @ 2026-07-16  9:08 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>

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).

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(-)

-- 
2.43.0


^ permalink raw reply	[flat|nested] 17+ messages in thread

* [PATCH v2 01/10] ASoC: ti: ams-delta: Use dev_err_probe() for error handling
  2026-07-16  9:08 [PATCH v2 00/10] ASoC: ti: Improve probe error handling phucduc.bui
@ 2026-07-16  9:08 ` phucduc.bui
  2026-07-16  9:08 ` [PATCH v2 02/10] ASoC: ti: davinci-evm: " phucduc.bui
                   ` (8 subsequent siblings)
  9 siblings, 0 replies; 17+ messages in thread
From: phucduc.bui @ 2026-07-16  9:08 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] 17+ messages in thread

* [PATCH v2 02/10] ASoC: ti: davinci-evm: Use dev_err_probe() for error handling
  2026-07-16  9:08 [PATCH v2 00/10] ASoC: ti: Improve probe error handling phucduc.bui
  2026-07-16  9:08 ` [PATCH v2 01/10] ASoC: ti: ams-delta: Use dev_err_probe() for " phucduc.bui
@ 2026-07-16  9:08 ` phucduc.bui
  2026-07-16  9:08 ` [PATCH v2 03/10] ASoC: ti: j721e-evm: Return the original error from card name parsing phucduc.bui
                   ` (7 subsequent siblings)
  9 siblings, 0 replies; 17+ messages in thread
From: phucduc.bui @ 2026-07-16  9:08 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] 17+ messages in thread

* [PATCH v2 03/10] ASoC: ti: j721e-evm: Return the original error from card name parsing
  2026-07-16  9:08 [PATCH v2 00/10] ASoC: ti: Improve probe error handling phucduc.bui
  2026-07-16  9:08 ` [PATCH v2 01/10] ASoC: ti: ams-delta: Use dev_err_probe() for " phucduc.bui
  2026-07-16  9:08 ` [PATCH v2 02/10] ASoC: ti: davinci-evm: " phucduc.bui
@ 2026-07-16  9:08 ` phucduc.bui
  2026-07-16  9:08 ` [PATCH v2 04/10] ASoC: ti: omap-abe-twl6040: Preserve error code and drop redundant log phucduc.bui
                   ` (6 subsequent siblings)
  9 siblings, 0 replies; 17+ messages in thread
From: phucduc.bui @ 2026-07-16  9:08 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] 17+ messages in thread

* [PATCH v2 04/10] ASoC: ti: omap-abe-twl6040: Preserve error code and drop redundant log
  2026-07-16  9:08 [PATCH v2 00/10] ASoC: ti: Improve probe error handling phucduc.bui
                   ` (2 preceding siblings ...)
  2026-07-16  9:08 ` [PATCH v2 03/10] ASoC: ti: j721e-evm: Return the original error from card name parsing phucduc.bui
@ 2026-07-16  9:08 ` phucduc.bui
  2026-07-16  9:08 ` [PATCH v2 05/10] ASoC: ti: omap-abe-twl6040: Use dev_err_probe() for error handling phucduc.bui
                   ` (5 subsequent siblings)
  9 siblings, 0 replies; 17+ messages in thread
From: phucduc.bui @ 2026-07-16  9:08 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] 17+ messages in thread

* [PATCH v2 05/10] ASoC: ti: omap-abe-twl6040: Use dev_err_probe() for error handling
  2026-07-16  9:08 [PATCH v2 00/10] ASoC: ti: Improve probe error handling phucduc.bui
                   ` (3 preceding siblings ...)
  2026-07-16  9:08 ` [PATCH v2 04/10] ASoC: ti: omap-abe-twl6040: Preserve error code and drop redundant log phucduc.bui
@ 2026-07-16  9:08 ` phucduc.bui
  2026-07-16  9:08 ` [PATCH v2 06/10] ASoC: ti: omap-dmic: " phucduc.bui
                   ` (4 subsequent siblings)
  9 siblings, 0 replies; 17+ messages in thread
From: phucduc.bui @ 2026-07-16  9:08 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] 17+ messages in thread

* [PATCH v2 06/10] ASoC: ti: omap-dmic: Use dev_err_probe() for error handling
  2026-07-16  9:08 [PATCH v2 00/10] ASoC: ti: Improve probe error handling phucduc.bui
                   ` (4 preceding siblings ...)
  2026-07-16  9:08 ` [PATCH v2 05/10] ASoC: ti: omap-abe-twl6040: Use dev_err_probe() for error handling phucduc.bui
@ 2026-07-16  9:08 ` phucduc.bui
  2026-07-16  9:08 ` [PATCH v2 07/10] ASoC: ti: omap-hdmi: " phucduc.bui
                   ` (3 subsequent siblings)
  9 siblings, 0 replies; 17+ messages in thread
From: phucduc.bui @ 2026-07-16  9:08 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] 17+ messages in thread

* [PATCH v2 07/10] ASoC: ti: omap-hdmi: Use dev_err_probe() for error handling
  2026-07-16  9:08 [PATCH v2 00/10] ASoC: ti: Improve probe error handling phucduc.bui
                   ` (5 preceding siblings ...)
  2026-07-16  9:08 ` [PATCH v2 06/10] ASoC: ti: omap-dmic: " phucduc.bui
@ 2026-07-16  9:08 ` phucduc.bui
  2026-07-16  9:28   ` Cezary Rojewski
  2026-07-16  9:08 ` [PATCH v2 08/10] ASoC: ti: omap-twl4030: Return the original error code phucduc.bui
                   ` (2 subsequent siblings)
  9 siblings, 1 reply; 17+ messages in thread
From: phucduc.bui @ 2026-07-16  9:08 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-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..72114965c37d 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] 17+ messages in thread

* [PATCH v2 08/10] ASoC: ti: omap-twl4030: Return the original error code
  2026-07-16  9:08 [PATCH v2 00/10] ASoC: ti: Improve probe error handling phucduc.bui
                   ` (6 preceding siblings ...)
  2026-07-16  9:08 ` [PATCH v2 07/10] ASoC: ti: omap-hdmi: " phucduc.bui
@ 2026-07-16  9:08 ` phucduc.bui
  2026-07-16  9:08 ` [PATCH v2 09/10] ASoC: ti: omap-twl4030: Use dev_err_probe() for error handling phucduc.bui
  2026-07-16  9:08 ` [PATCH v2 10/10] ASoC: ti: rx51: " phucduc.bui
  9 siblings, 0 replies; 17+ messages in thread
From: phucduc.bui @ 2026-07-16  9:08 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] 17+ messages in thread

* [PATCH v2 09/10] ASoC: ti: omap-twl4030: Use dev_err_probe() for error handling
  2026-07-16  9:08 [PATCH v2 00/10] ASoC: ti: Improve probe error handling phucduc.bui
                   ` (7 preceding siblings ...)
  2026-07-16  9:08 ` [PATCH v2 08/10] ASoC: ti: omap-twl4030: Return the original error code phucduc.bui
@ 2026-07-16  9:08 ` phucduc.bui
  2026-07-16  9:08 ` [PATCH v2 10/10] ASoC: ti: rx51: " phucduc.bui
  9 siblings, 0 replies; 17+ messages in thread
From: phucduc.bui @ 2026-07-16  9:08 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] 17+ messages in thread

* [PATCH v2 10/10] ASoC: ti: rx51: Use dev_err_probe() for error handling
  2026-07-16  9:08 [PATCH v2 00/10] ASoC: ti: Improve probe error handling phucduc.bui
                   ` (8 preceding siblings ...)
  2026-07-16  9:08 ` [PATCH v2 09/10] ASoC: ti: omap-twl4030: Use dev_err_probe() for error handling phucduc.bui
@ 2026-07-16  9:08 ` phucduc.bui
  2026-07-16 10:19   ` Cezary Rojewski
  9 siblings, 1 reply; 17+ messages in thread
From: phucduc.bui @ 2026-07-16  9:08 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>
---
 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..46053b8f3202 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] 17+ messages in thread

* Re: [PATCH v2 07/10] ASoC: ti: omap-hdmi: Use dev_err_probe() for error handling
  2026-07-16  9:08 ` [PATCH v2 07/10] ASoC: ti: omap-hdmi: " phucduc.bui
@ 2026-07-16  9:28   ` Cezary Rojewski
  2026-07-16 10:11     ` Bui Duc Phuc
  0 siblings, 1 reply; 17+ messages in thread
From: Cezary Rojewski @ 2026-07-16  9:28 UTC (permalink / raw)
  To: phucduc.bui
  Cc: linux-kernel, linux-sound, Mark Brown, Sen Wang, Liam Girdwood,
	Jaroslav Kysela, Takashi Iwai, Jarkko Nikula, Christophe JAILLET,
	linux-omap

On 7/16/2026 11:08 AM, phucduc.bui@gmail.com wrote:
> 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-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..72114965c37d 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");

Some patches have '()' some do not.  I'd expect all the patches updated 
as per Christophe's review.

>   
>   	ad->card = card;
>   	snd_soc_card_set_drvdata(card, ad);


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH v2 07/10] ASoC: ti: omap-hdmi: Use dev_err_probe() for error handling
  2026-07-16  9:28   ` Cezary Rojewski
@ 2026-07-16 10:11     ` Bui Duc Phuc
  0 siblings, 0 replies; 17+ messages in thread
From: Bui Duc Phuc @ 2026-07-16 10:11 UTC (permalink / raw)
  To: Cezary Rojewski
  Cc: linux-kernel, linux-sound, Mark Brown, Sen Wang, Liam Girdwood,
	Jaroslav Kysela, Takashi Iwai, Jarkko Nikula, Christophe JAILLET,
	linux-omap

Hi Cezary,

Thank you for your review.

> > +     if (ret)
> > +             return dev_err_probe(dev, ret, "snd_soc_register_card failed\n");
>
> Some patches have '()' some do not.  I'd expect all the patches updated
> as per Christophe's review.
>

Good catch. That one slipped through while I was preparing v2.
I'll make it consistent across all affected patches in v3.

Best regards,
Phuc

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH v2 10/10] ASoC: ti: rx51: Use dev_err_probe() for error handling
  2026-07-16  9:08 ` [PATCH v2 10/10] ASoC: ti: rx51: " phucduc.bui
@ 2026-07-16 10:19   ` Cezary Rojewski
  2026-07-16 10:41     ` Bui Duc Phuc
  0 siblings, 1 reply; 17+ messages in thread
From: Cezary Rojewski @ 2026-07-16 10:19 UTC (permalink / raw)
  To: phucduc.bui
  Cc: linux-kernel, linux-sound, Mark Brown, Sen Wang, Liam Girdwood,
	Jaroslav Kysela, Takashi Iwai, Jarkko Nikula, Christophe JAILLET,
	linux-omap

On 7/16/2026 11:08 AM, phucduc.bui@gmail.com wrote:

>   	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");

Pinging this patch too to make it easier, Phuc.  Certainly 7/10 isn't 
the only one.

>   
>   	return 0;
>   }


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH v2 10/10] ASoC: ti: rx51: Use dev_err_probe() for error handling
  2026-07-16 10:19   ` Cezary Rojewski
@ 2026-07-16 10:41     ` Bui Duc Phuc
  2026-07-16 11:15       ` Cezary Rojewski
  0 siblings, 1 reply; 17+ messages in thread
From: Bui Duc Phuc @ 2026-07-16 10:41 UTC (permalink / raw)
  To: Cezary Rojewski
  Cc: linux-kernel, linux-sound, Mark Brown, Sen Wang, Liam Girdwood,
	Jaroslav Kysela, Takashi Iwai, Jarkko Nikula, Christophe JAILLET,
	linux-omap

Hi Cezary,

Thanks for the reminder, Cezary.

>
> Pinging this patch too to make it easier, Phuc.  Certainly 7/10 isn't
> the only one.
>

I've fixed the remaining instances and sent the v3 series.

Best regards,
Phuc

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH v2 10/10] ASoC: ti: rx51: Use dev_err_probe() for error handling
  2026-07-16 10:41     ` Bui Duc Phuc
@ 2026-07-16 11:15       ` Cezary Rojewski
  2026-07-16 12:14         ` Bui Duc Phuc
  0 siblings, 1 reply; 17+ messages in thread
From: Cezary Rojewski @ 2026-07-16 11:15 UTC (permalink / raw)
  To: Bui Duc Phuc
  Cc: linux-kernel, linux-sound, Mark Brown, Sen Wang, Liam Girdwood,
	Jaroslav Kysela, Takashi Iwai, Jarkko Nikula, Christophe JAILLET,
	linux-omap

On 7/16/2026 12:41 PM, Bui Duc Phuc wrote:
> Hi Cezary,
> 
> Thanks for the reminder, Cezary.
> 
>>
>> Pinging this patch too to make it easier, Phuc.  Certainly 7/10 isn't
>> the only one.
>>
> 
> I've fixed the remaining instances and sent the v3 series.
Another round of helpful tips: wait a bit before sending another 
revision.  What if someone finds another "small" thing?  It is rare to 
have a good reason for generating high traffic on the list.  A day or 
two of break is OK for simple sets, week or two for features and such.

Also, please do include reviewers when sending updates - you've sent v3 
without including them (e.g.: me).

Kind regards,
Czarek

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH v2 10/10] ASoC: ti: rx51: Use dev_err_probe() for error handling
  2026-07-16 11:15       ` Cezary Rojewski
@ 2026-07-16 12:14         ` Bui Duc Phuc
  0 siblings, 0 replies; 17+ messages in thread
From: Bui Duc Phuc @ 2026-07-16 12:14 UTC (permalink / raw)
  To: Cezary Rojewski
  Cc: linux-kernel, linux-sound, Mark Brown, Sen Wang, Liam Girdwood,
	Jaroslav Kysela, Takashi Iwai, Jarkko Nikula, Christophe JAILLET,
	linux-omap

Hi Cezary,

Thanks for the advice.

> >
> > I've fixed the remaining instances and sent the v3 series.
> Another round of helpful tips: wait a bit before sending another
> revision.  What if someone finds another "small" thing?  It is rare to
> have a good reason for generating high traffic on the list.  A day or
> two of break is OK for simple sets, week or two for features and such.

That makes sense. I'll wait a few days before sending the next revision
to give people time for any additional comments.

>
> Also, please do include reviewers when sending updates - you've sent v3
> without including them (e.g.: me).
>

Sorry about that! I put your name in the v3 changelog but accidentally reused
my old ⁠git send-email⁠ command without updating the CC list.
Thanks for the reminder, I'll make sure to double-check the CCs for
future revisions

Best regards,
Phuc

^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2026-07-16 12:14 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-16  9:08 [PATCH v2 00/10] ASoC: ti: Improve probe error handling phucduc.bui
2026-07-16  9:08 ` [PATCH v2 01/10] ASoC: ti: ams-delta: Use dev_err_probe() for " phucduc.bui
2026-07-16  9:08 ` [PATCH v2 02/10] ASoC: ti: davinci-evm: " phucduc.bui
2026-07-16  9:08 ` [PATCH v2 03/10] ASoC: ti: j721e-evm: Return the original error from card name parsing phucduc.bui
2026-07-16  9:08 ` [PATCH v2 04/10] ASoC: ti: omap-abe-twl6040: Preserve error code and drop redundant log phucduc.bui
2026-07-16  9:08 ` [PATCH v2 05/10] ASoC: ti: omap-abe-twl6040: Use dev_err_probe() for error handling phucduc.bui
2026-07-16  9:08 ` [PATCH v2 06/10] ASoC: ti: omap-dmic: " phucduc.bui
2026-07-16  9:08 ` [PATCH v2 07/10] ASoC: ti: omap-hdmi: " phucduc.bui
2026-07-16  9:28   ` Cezary Rojewski
2026-07-16 10:11     ` Bui Duc Phuc
2026-07-16  9:08 ` [PATCH v2 08/10] ASoC: ti: omap-twl4030: Return the original error code phucduc.bui
2026-07-16  9:08 ` [PATCH v2 09/10] ASoC: ti: omap-twl4030: Use dev_err_probe() for error handling phucduc.bui
2026-07-16  9:08 ` [PATCH v2 10/10] ASoC: ti: rx51: " phucduc.bui
2026-07-16 10:19   ` Cezary Rojewski
2026-07-16 10:41     ` Bui Duc Phuc
2026-07-16 11:15       ` Cezary Rojewski
2026-07-16 12:14         ` Bui Duc Phuc

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox