* [PATCH 00/14] ASoC: rockchip: Simplify probe error handling
@ 2026-08-06 5:21 phucduc.bui
2026-08-06 5:21 ` [PATCH 01/14] ASoC: rockchip: rk3288_hdmi_analog: Drop redundant probe error messages phucduc.bui
` (13 more replies)
0 siblings, 14 replies; 15+ messages in thread
From: phucduc.bui @ 2026-08-06 5:21 UTC (permalink / raw)
To: Mark Brown, Nicolas Frattaroli, Liam Girdwood, Jaroslav Kysela,
Takashi Iwai, Heiko Stuebner, Nicolas Frattaroli, linux-rockchip
Cc: linux-kernel, linux-sound, linux-arm-kernel, bui duc phuc
From: bui duc phuc <phucduc.bui@gmail.com>
Hi all,
This series simplifies probe error handling across Rockchip ASoC drivers.
It replaces open-coded error handling with dev_err_probe() where
appropriate, removes redundant probe error messages, returns the
original error code directly, and fixes handling of -EPROBE_DEFER
returned by platform_get_irq_optional() in the Rockchip SAI driver
and devm_pinctrl_get() in the Rockchip I2S driver.
Compile tested only.
Best regards,
Phuc
bui duc phuc (14):
ASoC: rockchip: rk3288_hdmi_analog: Drop redundant probe error
messages
ASoC: rockchip: rk3288_hdmi_analog: Use dev_err_probe() for error
handling
ASoC: rockchip: rockchip_i2s: Use dev_err_probe() for error handling
ASoC: rockchip: rockchip_i2s: Drop redundant probe error messages
ASoC: rockchip: rockchip_i2s: Propagate -EPROBE_DEFER from
devm_pinctrl_get()
ASoC: rockchip: i2s-tdm: Inline PTR_ERR() in dev_err_probe()
ASoC: rockchip: i2s-tdm: Drop redundant probe error messages
ASoC: rockchip: rockchip_max98090: Drop redundant probe error messages
ASoC: rockchip: rockchip_pdm: Drop redundant probe error messages
ASoC: rockchip: rockchip_rt5645: Drop redundant probe error messages
ASoC: rockchip: rockchip_sai: Propagate -EPROBE_DEFER from IRQ lookup
ASoC: rockchip: rockchip_sai: Return the original error code
ASoC: rockchip: rockchip_sai: Drop redundant probe error messages
ASoC: rockchip: spdif: Return the original error code
sound/soc/rockchip/rk3288_hdmi_analog.c | 16 +++++--------
sound/soc/rockchip/rockchip_i2s.c | 30 +++++++++++--------------
sound/soc/rockchip/rockchip_i2s_tdm.c | 15 ++++---------
sound/soc/rockchip/rockchip_max98090.c | 5 +----
sound/soc/rockchip/rockchip_pdm.c | 8 ++-----
sound/soc/rockchip/rockchip_rt5645.c | 5 +----
sound/soc/rockchip/rockchip_sai.c | 15 +++++--------
sound/soc/rockchip/rockchip_spdif.c | 4 ++--
8 files changed, 34 insertions(+), 64 deletions(-)
--
2.43.0
^ permalink raw reply [flat|nested] 15+ messages in thread
* [PATCH 01/14] ASoC: rockchip: rk3288_hdmi_analog: Drop redundant probe error messages
2026-08-06 5:21 [PATCH 00/14] ASoC: rockchip: Simplify probe error handling phucduc.bui
@ 2026-08-06 5:21 ` phucduc.bui
2026-08-06 5:21 ` [PATCH 02/14] ASoC: rockchip: rk3288_hdmi_analog: Use dev_err_probe() for error handling phucduc.bui
` (12 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: phucduc.bui @ 2026-08-06 5:21 UTC (permalink / raw)
To: Mark Brown, Nicolas Frattaroli, Liam Girdwood, Jaroslav Kysela,
Takashi Iwai, Heiko Stuebner, Nicolas Frattaroli, linux-rockchip
Cc: linux-kernel, linux-sound, linux-arm-kernel, bui duc phuc
From: bui duc phuc <phucduc.bui@gmail.com>
Remove the probe error messages to avoid duplicate error reporting,
since the error is already reported by the called functions.
Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
---
sound/soc/rockchip/rk3288_hdmi_analog.c | 9 ++-------
1 file changed, 2 insertions(+), 7 deletions(-)
diff --git a/sound/soc/rockchip/rk3288_hdmi_analog.c b/sound/soc/rockchip/rk3288_hdmi_analog.c
index cf642a23c38a..d88d5ccfcdb2 100644
--- a/sound/soc/rockchip/rk3288_hdmi_analog.c
+++ b/sound/soc/rockchip/rk3288_hdmi_analog.c
@@ -185,10 +185,8 @@ static int snd_rk_mc_probe(struct platform_device *pdev)
gpiod_set_consumer_name(machine->gpio_hp_en, "hp_en");
ret = snd_soc_of_parse_card_name(card, "rockchip,model");
- if (ret) {
- dev_err(card->dev, "SoC parse card name failed %d\n", ret);
+ if (ret)
return ret;
- }
rk_dailink.codecs[0].of_node = of_parse_phandle(np,
"rockchip,audio-codec",
@@ -223,11 +221,8 @@ static int snd_rk_mc_probe(struct platform_device *pdev)
rk_dailink.platforms->of_node = rk_dailink.cpus->of_node;
ret = snd_soc_of_parse_audio_routing(card, "rockchip,routing");
- if (ret) {
- dev_err(&pdev->dev,
- "Unable to parse 'rockchip,routing' property\n");
+ if (ret)
return ret;
- }
snd_soc_card_set_drvdata(card, machine);
--
2.43.0
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH 02/14] ASoC: rockchip: rk3288_hdmi_analog: Use dev_err_probe() for error handling
2026-08-06 5:21 [PATCH 00/14] ASoC: rockchip: Simplify probe error handling phucduc.bui
2026-08-06 5:21 ` [PATCH 01/14] ASoC: rockchip: rk3288_hdmi_analog: Drop redundant probe error messages phucduc.bui
@ 2026-08-06 5:21 ` phucduc.bui
2026-08-06 5:21 ` [PATCH 03/14] ASoC: rockchip: rockchip_i2s: " phucduc.bui
` (11 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: phucduc.bui @ 2026-08-06 5:21 UTC (permalink / raw)
To: Mark Brown, Nicolas Frattaroli, Liam Girdwood, Jaroslav Kysela,
Takashi Iwai, Heiko Stuebner, Nicolas Frattaroli, linux-rockchip
Cc: linux-kernel, linux-sound, linux-arm-kernel, bui duc phuc
From: bui duc phuc <phucduc.bui@gmail.com>
Replace dev_err() with dev_err_probe() to prevent log spam when probe
returns -EPROBE_DEFER.
Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
---
sound/soc/rockchip/rk3288_hdmi_analog.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/sound/soc/rockchip/rk3288_hdmi_analog.c b/sound/soc/rockchip/rk3288_hdmi_analog.c
index d88d5ccfcdb2..541163ed56fc 100644
--- a/sound/soc/rockchip/rk3288_hdmi_analog.c
+++ b/sound/soc/rockchip/rk3288_hdmi_analog.c
@@ -205,10 +205,9 @@ static int snd_rk_mc_probe(struct platform_device *pdev)
}
ret = snd_soc_get_dai_name(&args, &rk_dailink.codecs[0].dai_name);
- if (ret) {
- dev_err(&pdev->dev, "Unable to get codec_dai_name\n");
- return ret;
- }
+ if (ret)
+ return dev_err_probe(&pdev->dev, ret,
+ "Unable to get codec_dai_name\n");
rk_dailink.cpus->of_node = of_parse_phandle(np, "rockchip,i2s-controller",
0);
--
2.43.0
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH 03/14] ASoC: rockchip: rockchip_i2s: Use dev_err_probe() for error handling
2026-08-06 5:21 [PATCH 00/14] ASoC: rockchip: Simplify probe error handling phucduc.bui
2026-08-06 5:21 ` [PATCH 01/14] ASoC: rockchip: rk3288_hdmi_analog: Drop redundant probe error messages phucduc.bui
2026-08-06 5:21 ` [PATCH 02/14] ASoC: rockchip: rk3288_hdmi_analog: Use dev_err_probe() for error handling phucduc.bui
@ 2026-08-06 5:21 ` phucduc.bui
2026-08-06 5:21 ` [PATCH 04/14] ASoC: rockchip: rockchip_i2s: Drop redundant probe error messages phucduc.bui
` (10 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: phucduc.bui @ 2026-08-06 5:21 UTC (permalink / raw)
To: Mark Brown, Nicolas Frattaroli, Liam Girdwood, Jaroslav Kysela,
Takashi Iwai, Heiko Stuebner, Nicolas Frattaroli, linux-rockchip
Cc: linux-kernel, linux-sound, linux-arm-kernel, bui duc phuc
From: bui duc phuc <phucduc.bui@gmail.com>
Replace dev_err() with dev_err_probe() to prevent log spam when probe
returns -EPROBE_DEFER.
Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
---
sound/soc/rockchip/rockchip_i2s.c | 14 ++++++--------
1 file changed, 6 insertions(+), 8 deletions(-)
diff --git a/sound/soc/rockchip/rockchip_i2s.c b/sound/soc/rockchip/rockchip_i2s.c
index 64c90316fa02..3e8d07b3fc1e 100644
--- a/sound/soc/rockchip/rockchip_i2s.c
+++ b/sound/soc/rockchip/rockchip_i2s.c
@@ -767,16 +767,14 @@ static int rockchip_i2s_probe(struct platform_device *pdev)
/* try to prepare related clocks */
i2s->hclk = devm_clk_get_enabled(&pdev->dev, "i2s_hclk");
- if (IS_ERR(i2s->hclk)) {
- dev_err(&pdev->dev, "Can't retrieve i2s bus clock\n");
- return PTR_ERR(i2s->hclk);
- }
+ if (IS_ERR(i2s->hclk))
+ return dev_err_probe(&pdev->dev, PTR_ERR(i2s->hclk),
+ "Can't retrieve i2s bus clock\n");
i2s->mclk = devm_clk_get(&pdev->dev, "i2s_clk");
- if (IS_ERR(i2s->mclk)) {
- dev_err(&pdev->dev, "Can't retrieve i2s master clock\n");
- return PTR_ERR(i2s->mclk);
- }
+ if (IS_ERR(i2s->mclk))
+ return dev_err_probe(&pdev->dev, PTR_ERR(i2s->mclk),
+ "Can't retrieve i2s master clock\n");
regs = devm_platform_get_and_ioremap_resource(pdev, 0, &res);
if (IS_ERR(regs))
--
2.43.0
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH 04/14] ASoC: rockchip: rockchip_i2s: Drop redundant probe error messages
2026-08-06 5:21 [PATCH 00/14] ASoC: rockchip: Simplify probe error handling phucduc.bui
` (2 preceding siblings ...)
2026-08-06 5:21 ` [PATCH 03/14] ASoC: rockchip: rockchip_i2s: " phucduc.bui
@ 2026-08-06 5:21 ` phucduc.bui
2026-08-06 5:21 ` [PATCH 05/14] ASoC: rockchip: rockchip_i2s: Propagate -EPROBE_DEFER from devm_pinctrl_get() phucduc.bui
` (9 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: phucduc.bui @ 2026-08-06 5:21 UTC (permalink / raw)
To: Mark Brown, Nicolas Frattaroli, Liam Girdwood, Jaroslav Kysela,
Takashi Iwai, Heiko Stuebner, Nicolas Frattaroli, linux-rockchip
Cc: linux-kernel, linux-sound, linux-arm-kernel, bui duc phuc
From: bui duc phuc <phucduc.bui@gmail.com>
Remove the probe error messages to avoid duplicate error reporting,
since the error is already reported by the called functions.
Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
---
sound/soc/rockchip/rockchip_i2s.c | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/sound/soc/rockchip/rockchip_i2s.c b/sound/soc/rockchip/rockchip_i2s.c
index 3e8d07b3fc1e..354430f916f9 100644
--- a/sound/soc/rockchip/rockchip_i2s.c
+++ b/sound/soc/rockchip/rockchip_i2s.c
@@ -829,16 +829,12 @@ static int rockchip_i2s_probe(struct platform_device *pdev)
&rockchip_i2s_component,
dai, 1);
- if (ret) {
- dev_err(&pdev->dev, "Could not register DAI\n");
+ if (ret)
return ret;
- }
ret = devm_snd_dmaengine_pcm_register(&pdev->dev, NULL, 0);
- if (ret) {
- dev_err(&pdev->dev, "Could not register PCM\n");
+ if (ret)
return ret;
- }
return 0;
}
--
2.43.0
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH 05/14] ASoC: rockchip: rockchip_i2s: Propagate -EPROBE_DEFER from devm_pinctrl_get()
2026-08-06 5:21 [PATCH 00/14] ASoC: rockchip: Simplify probe error handling phucduc.bui
` (3 preceding siblings ...)
2026-08-06 5:21 ` [PATCH 04/14] ASoC: rockchip: rockchip_i2s: Drop redundant probe error messages phucduc.bui
@ 2026-08-06 5:21 ` phucduc.bui
2026-08-06 5:21 ` [PATCH 06/14] ASoC: rockchip: i2s-tdm: Inline PTR_ERR() in dev_err_probe() phucduc.bui
` (8 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: phucduc.bui @ 2026-08-06 5:21 UTC (permalink / raw)
To: Mark Brown, Nicolas Frattaroli, Liam Girdwood, Jaroslav Kysela,
Takashi Iwai, Heiko Stuebner, Nicolas Frattaroli, linux-rockchip
Cc: linux-kernel, linux-sound, linux-arm-kernel, bui duc phuc
From: bui duc phuc <phucduc.bui@gmail.com>
Return -EPROBE_DEFER from devm_pinctrl_get() instead of ignoring it and
continuing probe. This allows the driver to be reprobed once the
pinctrl provider becomes available.
Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
---
sound/soc/rockchip/rockchip_i2s.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/sound/soc/rockchip/rockchip_i2s.c b/sound/soc/rockchip/rockchip_i2s.c
index 354430f916f9..261f36d4c2fd 100644
--- a/sound/soc/rockchip/rockchip_i2s.c
+++ b/sound/soc/rockchip/rockchip_i2s.c
@@ -790,7 +790,11 @@ static int rockchip_i2s_probe(struct platform_device *pdev)
i2s->bclk_ratio = 64;
i2s->pinctrl = devm_pinctrl_get(&pdev->dev);
- if (!IS_ERR(i2s->pinctrl)) {
+ if (IS_ERR(i2s->pinctrl)) {
+ if (PTR_ERR(i2s->pinctrl) == -EPROBE_DEFER)
+ return -EPROBE_DEFER;
+ dev_dbg(&pdev->dev, "failed to find i2s pinctrl\n");
+ } else {
i2s->bclk_on = pinctrl_lookup_state(i2s->pinctrl, "bclk_on");
if (!IS_ERR_OR_NULL(i2s->bclk_on)) {
i2s->bclk_off = pinctrl_lookup_state(i2s->pinctrl, "bclk_off");
@@ -799,8 +803,6 @@ static int rockchip_i2s_probe(struct platform_device *pdev)
return -EINVAL;
}
}
- } else {
- dev_dbg(&pdev->dev, "failed to find i2s pinctrl\n");
}
i2s_pinctrl_select_bclk_off(i2s);
--
2.43.0
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH 06/14] ASoC: rockchip: i2s-tdm: Inline PTR_ERR() in dev_err_probe()
2026-08-06 5:21 [PATCH 00/14] ASoC: rockchip: Simplify probe error handling phucduc.bui
` (4 preceding siblings ...)
2026-08-06 5:21 ` [PATCH 05/14] ASoC: rockchip: rockchip_i2s: Propagate -EPROBE_DEFER from devm_pinctrl_get() phucduc.bui
@ 2026-08-06 5:21 ` phucduc.bui
2026-08-06 5:21 ` [PATCH 07/14] ASoC: rockchip: i2s-tdm: Drop redundant probe error messages phucduc.bui
` (7 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: phucduc.bui @ 2026-08-06 5:21 UTC (permalink / raw)
To: Mark Brown, Nicolas Frattaroli, Liam Girdwood, Jaroslav Kysela,
Takashi Iwai, Heiko Stuebner, Nicolas Frattaroli, linux-rockchip
Cc: linux-kernel, linux-sound, linux-arm-kernel, bui duc phuc
From: bui duc phuc <phucduc.bui@gmail.com>
Pass PTR_ERR() directly to dev_err_probe() and avoid assigning it to
the local variable first.
Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
---
sound/soc/rockchip/rockchip_i2s_tdm.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/sound/soc/rockchip/rockchip_i2s_tdm.c b/sound/soc/rockchip/rockchip_i2s_tdm.c
index e6229a325ffe..c9ad769a4072 100644
--- a/sound/soc/rockchip/rockchip_i2s_tdm.c
+++ b/sound/soc/rockchip/rockchip_i2s_tdm.c
@@ -1263,16 +1263,14 @@ static int rockchip_i2s_tdm_probe(struct platform_device *pdev)
i2s_tdm->tx_reset = devm_reset_control_get_optional_exclusive(&pdev->dev,
"tx-m");
if (IS_ERR(i2s_tdm->tx_reset)) {
- ret = PTR_ERR(i2s_tdm->tx_reset);
- return dev_err_probe(i2s_tdm->dev, ret,
+ return dev_err_probe(i2s_tdm->dev, PTR_ERR(i2s_tdm->tx_reset),
"Error in tx-m reset control\n");
}
i2s_tdm->rx_reset = devm_reset_control_get_optional_exclusive(&pdev->dev,
"rx-m");
if (IS_ERR(i2s_tdm->rx_reset)) {
- ret = PTR_ERR(i2s_tdm->rx_reset);
- return dev_err_probe(i2s_tdm->dev, ret,
+ return dev_err_probe(i2s_tdm->dev, PTR_ERR(i2s_tdm->rx_reset),
"Error in rx-m reset control\n");
}
--
2.43.0
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH 07/14] ASoC: rockchip: i2s-tdm: Drop redundant probe error messages
2026-08-06 5:21 [PATCH 00/14] ASoC: rockchip: Simplify probe error handling phucduc.bui
` (5 preceding siblings ...)
2026-08-06 5:21 ` [PATCH 06/14] ASoC: rockchip: i2s-tdm: Inline PTR_ERR() in dev_err_probe() phucduc.bui
@ 2026-08-06 5:21 ` phucduc.bui
2026-08-06 5:21 ` [PATCH 08/14] ASoC: rockchip: rockchip_max98090: " phucduc.bui
` (6 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: phucduc.bui @ 2026-08-06 5:21 UTC (permalink / raw)
To: Mark Brown, Nicolas Frattaroli, Liam Girdwood, Jaroslav Kysela,
Takashi Iwai, Heiko Stuebner, Nicolas Frattaroli, linux-rockchip
Cc: linux-kernel, linux-sound, linux-arm-kernel, bui duc phuc
From: bui duc phuc <phucduc.bui@gmail.com>
Remove the probe error messages to avoid duplicate error reporting,
since the error is already reported by the called functions.
Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
---
sound/soc/rockchip/rockchip_i2s_tdm.c | 9 ++-------
1 file changed, 2 insertions(+), 7 deletions(-)
diff --git a/sound/soc/rockchip/rockchip_i2s_tdm.c b/sound/soc/rockchip/rockchip_i2s_tdm.c
index c9ad769a4072..5ef7f109706d 100644
--- a/sound/soc/rockchip/rockchip_i2s_tdm.c
+++ b/sound/soc/rockchip/rockchip_i2s_tdm.c
@@ -1361,17 +1361,12 @@ static int rockchip_i2s_tdm_probe(struct platform_device *pdev)
ret = devm_snd_soc_register_component(&pdev->dev,
&rockchip_i2s_tdm_component,
i2s_tdm->dai, 1);
-
- if (ret) {
- dev_err(&pdev->dev, "Could not register DAI\n");
+ if (ret)
goto err_suspend;
- }
ret = devm_snd_dmaengine_pcm_register(&pdev->dev, NULL, 0);
- if (ret) {
- dev_err(&pdev->dev, "Could not register PCM\n");
+ if (ret)
goto err_suspend;
- }
return 0;
--
2.43.0
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH 08/14] ASoC: rockchip: rockchip_max98090: Drop redundant probe error messages
2026-08-06 5:21 [PATCH 00/14] ASoC: rockchip: Simplify probe error handling phucduc.bui
` (6 preceding siblings ...)
2026-08-06 5:21 ` [PATCH 07/14] ASoC: rockchip: i2s-tdm: Drop redundant probe error messages phucduc.bui
@ 2026-08-06 5:21 ` phucduc.bui
2026-08-06 5:21 ` [PATCH 09/14] ASoC: rockchip: rockchip_pdm: " phucduc.bui
` (5 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: phucduc.bui @ 2026-08-06 5:21 UTC (permalink / raw)
To: Mark Brown, Nicolas Frattaroli, Liam Girdwood, Jaroslav Kysela,
Takashi Iwai, Heiko Stuebner, Nicolas Frattaroli, linux-rockchip
Cc: linux-kernel, linux-sound, linux-arm-kernel, bui duc phuc
From: bui duc phuc <phucduc.bui@gmail.com>
Remove the probe error messages to avoid duplicate error reporting,
since the error is already reported by the called functions.
Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
---
sound/soc/rockchip/rockchip_max98090.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/sound/soc/rockchip/rockchip_max98090.c b/sound/soc/rockchip/rockchip_max98090.c
index 075d0990a126..426506a8e18e 100644
--- a/sound/soc/rockchip/rockchip_max98090.c
+++ b/sound/soc/rockchip/rockchip_max98090.c
@@ -428,11 +428,8 @@ static int snd_rk_mc_probe(struct platform_device *pdev)
/* Parse card name. */
ret = snd_soc_of_parse_card_name(card, "rockchip,model");
- if (ret) {
- dev_err(&pdev->dev,
- "Soc parse card name failed %d\n", ret);
+ if (ret)
return ret;
- }
/* register the soc card */
ret = devm_snd_soc_register_card(&pdev->dev, card);
--
2.43.0
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH 09/14] ASoC: rockchip: rockchip_pdm: Drop redundant probe error messages
2026-08-06 5:21 [PATCH 00/14] ASoC: rockchip: Simplify probe error handling phucduc.bui
` (7 preceding siblings ...)
2026-08-06 5:21 ` [PATCH 08/14] ASoC: rockchip: rockchip_max98090: " phucduc.bui
@ 2026-08-06 5:21 ` phucduc.bui
2026-08-06 5:21 ` [PATCH 10/14] ASoC: rockchip: rockchip_rt5645: " phucduc.bui
` (4 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: phucduc.bui @ 2026-08-06 5:21 UTC (permalink / raw)
To: Mark Brown, Nicolas Frattaroli, Liam Girdwood, Jaroslav Kysela,
Takashi Iwai, Heiko Stuebner, Nicolas Frattaroli, linux-rockchip
Cc: linux-kernel, linux-sound, linux-arm-kernel, bui duc phuc
From: bui duc phuc <phucduc.bui@gmail.com>
Remove the probe error messages to avoid duplicate error reporting,
since the error is already reported by the called functions.
Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
---
sound/soc/rockchip/rockchip_pdm.c | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/sound/soc/rockchip/rockchip_pdm.c b/sound/soc/rockchip/rockchip_pdm.c
index 115e90d3bbfe..343fda478901 100644
--- a/sound/soc/rockchip/rockchip_pdm.c
+++ b/sound/soc/rockchip/rockchip_pdm.c
@@ -630,10 +630,8 @@ static int rockchip_pdm_probe(struct platform_device *pdev)
&rockchip_pdm_component,
&rockchip_pdm_dai, 1);
- if (ret) {
- dev_err(&pdev->dev, "could not register dai: %d\n", ret);
+ if (ret)
goto err_suspend;
- }
rockchip_pdm_rxctrl(pdm, 0);
@@ -642,10 +640,8 @@ static int rockchip_pdm_probe(struct platform_device *pdev)
goto err_suspend;
ret = devm_snd_dmaengine_pcm_register(&pdev->dev, NULL, 0);
- if (ret) {
- dev_err(&pdev->dev, "could not register pcm: %d\n", ret);
+ if (ret)
goto err_suspend;
- }
return 0;
--
2.43.0
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH 10/14] ASoC: rockchip: rockchip_rt5645: Drop redundant probe error messages
2026-08-06 5:21 [PATCH 00/14] ASoC: rockchip: Simplify probe error handling phucduc.bui
` (8 preceding siblings ...)
2026-08-06 5:21 ` [PATCH 09/14] ASoC: rockchip: rockchip_pdm: " phucduc.bui
@ 2026-08-06 5:21 ` phucduc.bui
2026-08-06 5:21 ` [PATCH 11/14] ASoC: rockchip: rockchip_sai: Propagate -EPROBE_DEFER from IRQ lookup phucduc.bui
` (3 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: phucduc.bui @ 2026-08-06 5:21 UTC (permalink / raw)
To: Mark Brown, Nicolas Frattaroli, Liam Girdwood, Jaroslav Kysela,
Takashi Iwai, Heiko Stuebner, Nicolas Frattaroli, linux-rockchip
Cc: linux-kernel, linux-sound, linux-arm-kernel, bui duc phuc
From: bui duc phuc <phucduc.bui@gmail.com>
Remove the probe error messages to avoid duplicate error reporting,
since the error is already reported by the called functions.
Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
---
sound/soc/rockchip/rockchip_rt5645.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/sound/soc/rockchip/rockchip_rt5645.c b/sound/soc/rockchip/rockchip_rt5645.c
index 590b64b362f6..0432eeabc64e 100644
--- a/sound/soc/rockchip/rockchip_rt5645.c
+++ b/sound/soc/rockchip/rockchip_rt5645.c
@@ -191,11 +191,8 @@ static int snd_rk_mc_probe(struct platform_device *pdev)
rk_dailink.platforms->of_node = rk_dailink.cpus->of_node;
ret = snd_soc_of_parse_card_name(card, "rockchip,model");
- if (ret) {
- dev_err(&pdev->dev,
- "Soc parse card name failed %d\n", ret);
+ if (ret)
goto put_cpu_of_node;
- }
ret = devm_snd_soc_register_card(&pdev->dev, card);
if (ret) {
--
2.43.0
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH 11/14] ASoC: rockchip: rockchip_sai: Propagate -EPROBE_DEFER from IRQ lookup
2026-08-06 5:21 [PATCH 00/14] ASoC: rockchip: Simplify probe error handling phucduc.bui
` (9 preceding siblings ...)
2026-08-06 5:21 ` [PATCH 10/14] ASoC: rockchip: rockchip_rt5645: " phucduc.bui
@ 2026-08-06 5:21 ` phucduc.bui
2026-08-06 5:21 ` [PATCH 12/14] ASoC: rockchip: rockchip_sai: Return the original error code phucduc.bui
` (2 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: phucduc.bui @ 2026-08-06 5:21 UTC (permalink / raw)
To: Mark Brown, Nicolas Frattaroli, Liam Girdwood, Jaroslav Kysela,
Takashi Iwai, Heiko Stuebner, Nicolas Frattaroli, linux-rockchip
Cc: linux-kernel, linux-sound, linux-arm-kernel, bui duc phuc
From: bui duc phuc <phucduc.bui@gmail.com>
Return -EPROBE_DEFER from platform_get_irq_optional() so the driver is
re-probed when the interrupt resource becomes available instead of
continuing probe without an IRQ.
Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
---
sound/soc/rockchip/rockchip_sai.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/sound/soc/rockchip/rockchip_sai.c b/sound/soc/rockchip/rockchip_sai.c
index 585e89f61f0d..522b4f4f6a7a 100644
--- a/sound/soc/rockchip/rockchip_sai.c
+++ b/sound/soc/rockchip/rockchip_sai.c
@@ -1428,6 +1428,8 @@ static int rockchip_sai_probe(struct platform_device *pdev)
"Failed to initialize regmap\n");
irq = platform_get_irq_optional(pdev, 0);
+ if (irq == -EPROBE_DEFER)
+ return irq;
if (irq > 0) {
ret = devm_request_irq(&pdev->dev, irq, rockchip_sai_isr,
IRQF_SHARED, node->name, sai);
--
2.43.0
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH 12/14] ASoC: rockchip: rockchip_sai: Return the original error code
2026-08-06 5:21 [PATCH 00/14] ASoC: rockchip: Simplify probe error handling phucduc.bui
` (10 preceding siblings ...)
2026-08-06 5:21 ` [PATCH 11/14] ASoC: rockchip: rockchip_sai: Propagate -EPROBE_DEFER from IRQ lookup phucduc.bui
@ 2026-08-06 5:21 ` phucduc.bui
2026-08-06 5:21 ` [PATCH 13/14] ASoC: rockchip: rockchip_sai: Drop redundant probe error messages phucduc.bui
2026-08-06 5:21 ` [PATCH 14/14] ASoC: rockchip: spdif: Return the original error code phucduc.bui
13 siblings, 0 replies; 15+ messages in thread
From: phucduc.bui @ 2026-08-06 5:21 UTC (permalink / raw)
To: Mark Brown, Nicolas Frattaroli, Liam Girdwood, Jaroslav Kysela,
Takashi Iwai, Heiko Stuebner, Nicolas Frattaroli, linux-rockchip
Cc: linux-kernel, linux-sound, linux-arm-kernel, bui duc phuc
From: bui duc phuc <phucduc.bui@gmail.com>
Return the original error code directly and drop the redundant error
message since the called function already reports the failure.
Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
---
sound/soc/rockchip/rockchip_sai.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/sound/soc/rockchip/rockchip_sai.c b/sound/soc/rockchip/rockchip_sai.c
index 522b4f4f6a7a..1fdec12a0d4e 100644
--- a/sound/soc/rockchip/rockchip_sai.c
+++ b/sound/soc/rockchip/rockchip_sai.c
@@ -1434,8 +1434,7 @@ static int rockchip_sai_probe(struct platform_device *pdev)
ret = devm_request_irq(&pdev->dev, irq, rockchip_sai_isr,
IRQF_SHARED, node->name, sai);
if (ret)
- return dev_err_probe(&pdev->dev, ret,
- "Failed to request irq %d\n", irq);
+ return ret;
} else {
dev_dbg(&pdev->dev, "Asked for an IRQ but got %d\n", irq);
}
@@ -1458,7 +1457,7 @@ static int rockchip_sai_probe(struct platform_device *pdev)
ret = rockchip_sai_parse_paths(sai, node);
if (ret)
- return dev_err_probe(&pdev->dev, ret, "Failed to parse paths\n");
+ return ret;
/*
* From here on, all register accesses need to be wrapped in
--
2.43.0
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH 13/14] ASoC: rockchip: rockchip_sai: Drop redundant probe error messages
2026-08-06 5:21 [PATCH 00/14] ASoC: rockchip: Simplify probe error handling phucduc.bui
` (11 preceding siblings ...)
2026-08-06 5:21 ` [PATCH 12/14] ASoC: rockchip: rockchip_sai: Return the original error code phucduc.bui
@ 2026-08-06 5:21 ` phucduc.bui
2026-08-06 5:21 ` [PATCH 14/14] ASoC: rockchip: spdif: Return the original error code phucduc.bui
13 siblings, 0 replies; 15+ messages in thread
From: phucduc.bui @ 2026-08-06 5:21 UTC (permalink / raw)
To: Mark Brown, Nicolas Frattaroli, Liam Girdwood, Jaroslav Kysela,
Takashi Iwai, Heiko Stuebner, Nicolas Frattaroli, linux-rockchip
Cc: linux-kernel, linux-sound, linux-arm-kernel, bui duc phuc
From: bui duc phuc <phucduc.bui@gmail.com>
Remove the probe error messages to avoid duplicate error reporting,
since the error is already reported by the called functions.
Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
---
sound/soc/rockchip/rockchip_sai.c | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/sound/soc/rockchip/rockchip_sai.c b/sound/soc/rockchip/rockchip_sai.c
index 1fdec12a0d4e..30b5e71d0937 100644
--- a/sound/soc/rockchip/rockchip_sai.c
+++ b/sound/soc/rockchip/rockchip_sai.c
@@ -1472,18 +1472,14 @@ static int rockchip_sai_probe(struct platform_device *pdev)
return dev_err_probe(&pdev->dev, ret, "Failed to resume device\n");
ret = devm_snd_dmaengine_pcm_register(&pdev->dev, NULL, 0);
- if (ret) {
- dev_err(&pdev->dev, "Failed to register PCM: %d\n", ret);
+ if (ret)
goto err_runtime_suspend;
- }
ret = devm_snd_soc_register_component(&pdev->dev,
&rockchip_sai_component,
dai, 1);
- if (ret) {
- dev_err(&pdev->dev, "Failed to register component: %d\n", ret);
+ if (ret)
goto err_runtime_suspend;
- }
pm_runtime_use_autosuspend(&pdev->dev);
pm_runtime_put(&pdev->dev);
--
2.43.0
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH 14/14] ASoC: rockchip: spdif: Return the original error code
2026-08-06 5:21 [PATCH 00/14] ASoC: rockchip: Simplify probe error handling phucduc.bui
` (12 preceding siblings ...)
2026-08-06 5:21 ` [PATCH 13/14] ASoC: rockchip: rockchip_sai: Drop redundant probe error messages phucduc.bui
@ 2026-08-06 5:21 ` phucduc.bui
13 siblings, 0 replies; 15+ messages in thread
From: phucduc.bui @ 2026-08-06 5:21 UTC (permalink / raw)
To: Mark Brown, Nicolas Frattaroli, Liam Girdwood, Jaroslav Kysela,
Takashi Iwai, Heiko Stuebner, Nicolas Frattaroli, linux-rockchip
Cc: linux-kernel, linux-sound, linux-arm-kernel, bui duc phuc
From: bui duc phuc <phucduc.bui@gmail.com>
Return the original error code directly and drop the redundant error
message since the called function already reports the failure.
Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
---
sound/soc/rockchip/rockchip_spdif.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/sound/soc/rockchip/rockchip_spdif.c b/sound/soc/rockchip/rockchip_spdif.c
index 7f15bc7f8f35..2d53efd5dd2e 100644
--- a/sound/soc/rockchip/rockchip_spdif.c
+++ b/sound/soc/rockchip/rockchip_spdif.c
@@ -396,13 +396,13 @@ static int rk_spdif_probe(struct platform_device *pdev)
ret = devm_snd_dmaengine_pcm_register(&pdev->dev, NULL, 0);
if (ret)
- return dev_err_probe(&pdev->dev, ret, "Could not register PCM\n");
+ return ret;
ret = devm_snd_soc_register_component(&pdev->dev,
&rk_spdif_component,
&rk_spdif_dai, 1);
if (ret)
- return dev_err_probe(&pdev->dev, ret, "Could not register DAI\n");
+ return ret;
return 0;
}
--
2.43.0
^ permalink raw reply related [flat|nested] 15+ messages in thread
end of thread, other threads:[~2026-08-06 5:23 UTC | newest]
Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-06 5:21 [PATCH 00/14] ASoC: rockchip: Simplify probe error handling phucduc.bui
2026-08-06 5:21 ` [PATCH 01/14] ASoC: rockchip: rk3288_hdmi_analog: Drop redundant probe error messages phucduc.bui
2026-08-06 5:21 ` [PATCH 02/14] ASoC: rockchip: rk3288_hdmi_analog: Use dev_err_probe() for error handling phucduc.bui
2026-08-06 5:21 ` [PATCH 03/14] ASoC: rockchip: rockchip_i2s: " phucduc.bui
2026-08-06 5:21 ` [PATCH 04/14] ASoC: rockchip: rockchip_i2s: Drop redundant probe error messages phucduc.bui
2026-08-06 5:21 ` [PATCH 05/14] ASoC: rockchip: rockchip_i2s: Propagate -EPROBE_DEFER from devm_pinctrl_get() phucduc.bui
2026-08-06 5:21 ` [PATCH 06/14] ASoC: rockchip: i2s-tdm: Inline PTR_ERR() in dev_err_probe() phucduc.bui
2026-08-06 5:21 ` [PATCH 07/14] ASoC: rockchip: i2s-tdm: Drop redundant probe error messages phucduc.bui
2026-08-06 5:21 ` [PATCH 08/14] ASoC: rockchip: rockchip_max98090: " phucduc.bui
2026-08-06 5:21 ` [PATCH 09/14] ASoC: rockchip: rockchip_pdm: " phucduc.bui
2026-08-06 5:21 ` [PATCH 10/14] ASoC: rockchip: rockchip_rt5645: " phucduc.bui
2026-08-06 5:21 ` [PATCH 11/14] ASoC: rockchip: rockchip_sai: Propagate -EPROBE_DEFER from IRQ lookup phucduc.bui
2026-08-06 5:21 ` [PATCH 12/14] ASoC: rockchip: rockchip_sai: Return the original error code phucduc.bui
2026-08-06 5:21 ` [PATCH 13/14] ASoC: rockchip: rockchip_sai: Drop redundant probe error messages phucduc.bui
2026-08-06 5:21 ` [PATCH 14/14] ASoC: rockchip: spdif: Return the original error code phucduc.bui
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox