* [PATCH 0/3] ASoC: mxs: Improve probe error handling
@ 2026-08-12 10:14 phucduc.bui
2026-08-12 10:14 ` [PATCH 1/3] ASoC: mxs-saif: Use dev_err_probe() for " phucduc.bui
` (3 more replies)
0 siblings, 4 replies; 8+ messages in thread
From: phucduc.bui @ 2026-08-12 10:14 UTC (permalink / raw)
To: Frank Li, Liam Girdwood, Mark Brown, Jaroslav Kysela,
Takashi Iwai, Sascha Hauer, Pengutronix Kernel Team
Cc: Fabio Estevam, Michael Trimarchi, Dario Binacchi, imx,
linux-arm-kernel, linux-sound, linux-kernel, bui duc phuc
From: bui duc phuc <phucduc.bui@gmail.com>
Hi all,
This series improves probe error handling in the MXS ASoC drivers.
Use dev_err_probe() where appropriate and remove redundant dev_err() calls
when the corresponding errors are already reported by the called functions
or further down the call chain.
Compile-tested only.
Best regards,
Phuc
bui duc phuc (3):
ASoC: mxs-saif: Use dev_err_probe() for error handling
ASoC: mxs-saif: Drop redundant probe error messages
ASoC: mxs-sgtl5000: Drop redundant probe error messages
sound/soc/mxs/mxs-saif.c | 21 ++++++---------------
sound/soc/mxs/mxs-sgtl5000.c | 2 --
2 files changed, 6 insertions(+), 17 deletions(-)
--
2.43.0
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 1/3] ASoC: mxs-saif: Use dev_err_probe() for error handling
2026-08-12 10:14 [PATCH 0/3] ASoC: mxs: Improve probe error handling phucduc.bui
@ 2026-08-12 10:14 ` phucduc.bui
2026-08-12 14:17 ` Frank Li
2026-08-12 10:14 ` [PATCH 2/3] ASoC: mxs-saif: Drop redundant probe error messages phucduc.bui
` (2 subsequent siblings)
3 siblings, 1 reply; 8+ messages in thread
From: phucduc.bui @ 2026-08-12 10:14 UTC (permalink / raw)
To: Frank Li, Liam Girdwood, Mark Brown, Jaroslav Kysela,
Takashi Iwai, Sascha Hauer, Pengutronix Kernel Team
Cc: Fabio Estevam, Michael Trimarchi, Dario Binacchi, imx,
linux-arm-kernel, linux-sound, linux-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/mxs/mxs-saif.c | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/sound/soc/mxs/mxs-saif.c b/sound/soc/mxs/mxs-saif.c
index a01a680ad4d7..b877c978a04c 100644
--- a/sound/soc/mxs/mxs-saif.c
+++ b/sound/soc/mxs/mxs-saif.c
@@ -826,12 +826,9 @@ static int mxs_saif_probe(struct platform_device *pdev)
mxs_saif[saif->id] = saif;
saif->clk = devm_clk_get(&pdev->dev, NULL);
- if (IS_ERR(saif->clk)) {
- ret = PTR_ERR(saif->clk);
- dev_err(&pdev->dev, "Cannot get the clock: %d\n",
- ret);
- return ret;
- }
+ if (IS_ERR(saif->clk))
+ return dev_err_probe(&pdev->dev, PTR_ERR(saif->clk),
+ "Cannot get the clock\n");
saif->base = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(saif->base))
--
2.43.0
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 2/3] ASoC: mxs-saif: Drop redundant probe error messages
2026-08-12 10:14 [PATCH 0/3] ASoC: mxs: Improve probe error handling phucduc.bui
2026-08-12 10:14 ` [PATCH 1/3] ASoC: mxs-saif: Use dev_err_probe() for " phucduc.bui
@ 2026-08-12 10:14 ` phucduc.bui
2026-08-12 10:14 ` [PATCH 3/3] ASoC: mxs-sgtl5000: " phucduc.bui
2026-08-12 17:40 ` [PATCH 0/3] ASoC: mxs: Improve probe error handling Mark Brown
3 siblings, 0 replies; 8+ messages in thread
From: phucduc.bui @ 2026-08-12 10:14 UTC (permalink / raw)
To: Frank Li, Liam Girdwood, Mark Brown, Jaroslav Kysela,
Takashi Iwai, Sascha Hauer, Pengutronix Kernel Team
Cc: Fabio Estevam, Michael Trimarchi, Dario Binacchi, imx,
linux-arm-kernel, linux-sound, linux-kernel, bui duc phuc
From: bui duc phuc <phucduc.bui@gmail.com>
The functions called here don't log the error themselves, but the
error is already reported deeper in the call chain, so the dev_err()
calls are redundant and can be removed.
Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
---
sound/soc/mxs/mxs-saif.c | 12 +++---------
1 file changed, 3 insertions(+), 9 deletions(-)
diff --git a/sound/soc/mxs/mxs-saif.c b/sound/soc/mxs/mxs-saif.c
index b877c978a04c..a77cd516a1bf 100644
--- a/sound/soc/mxs/mxs-saif.c
+++ b/sound/soc/mxs/mxs-saif.c
@@ -841,10 +841,8 @@ static int mxs_saif_probe(struct platform_device *pdev)
saif->dev = &pdev->dev;
ret = devm_request_irq(&pdev->dev, irq, mxs_saif_irq, 0,
dev_name(&pdev->dev), saif);
- if (ret) {
- dev_err(&pdev->dev, "failed to request irq\n");
+ if (ret)
return ret;
- }
platform_set_drvdata(pdev, saif);
@@ -857,16 +855,12 @@ static int mxs_saif_probe(struct platform_device *pdev)
ret = devm_snd_soc_register_component(&pdev->dev, &mxs_saif_component,
&mxs_saif_dai, 1);
- if (ret) {
- dev_err(&pdev->dev, "register DAI failed\n");
+ if (ret)
return ret;
- }
ret = mxs_pcm_platform_register(&pdev->dev);
- if (ret) {
- dev_err(&pdev->dev, "register PCM failed: %d\n", ret);
+ if (ret)
return ret;
- }
return 0;
}
--
2.43.0
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 3/3] ASoC: mxs-sgtl5000: Drop redundant probe error messages
2026-08-12 10:14 [PATCH 0/3] ASoC: mxs: Improve probe error handling phucduc.bui
2026-08-12 10:14 ` [PATCH 1/3] ASoC: mxs-saif: Use dev_err_probe() for " phucduc.bui
2026-08-12 10:14 ` [PATCH 2/3] ASoC: mxs-saif: Drop redundant probe error messages phucduc.bui
@ 2026-08-12 10:14 ` phucduc.bui
2026-08-12 13:51 ` Daniel Baluta
2026-08-12 14:15 ` Frank Li
2026-08-12 17:40 ` [PATCH 0/3] ASoC: mxs: Improve probe error handling Mark Brown
3 siblings, 2 replies; 8+ messages in thread
From: phucduc.bui @ 2026-08-12 10:14 UTC (permalink / raw)
To: Frank Li, Liam Girdwood, Mark Brown, Jaroslav Kysela,
Takashi Iwai, Sascha Hauer, Pengutronix Kernel Team
Cc: Fabio Estevam, Michael Trimarchi, Dario Binacchi, imx,
linux-arm-kernel, linux-sound, linux-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/mxs/mxs-sgtl5000.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/sound/soc/mxs/mxs-sgtl5000.c b/sound/soc/mxs/mxs-sgtl5000.c
index f1c0e612313d..a253a48ca59c 100644
--- a/sound/soc/mxs/mxs-sgtl5000.c
+++ b/sound/soc/mxs/mxs-sgtl5000.c
@@ -155,8 +155,6 @@ static int mxs_sgtl5000_probe(struct platform_device *pdev)
ret = snd_soc_of_parse_audio_routing(card, "audio-routing");
if (ret) {
- dev_err(&pdev->dev, "failed to parse audio-routing (%d)\n",
- ret);
mxs_saif_put_mclk(0);
return ret;
}
--
2.43.0
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 3/3] ASoC: mxs-sgtl5000: Drop redundant probe error messages
2026-08-12 10:14 ` [PATCH 3/3] ASoC: mxs-sgtl5000: " phucduc.bui
@ 2026-08-12 13:51 ` Daniel Baluta
2026-08-12 14:15 ` Frank Li
1 sibling, 0 replies; 8+ messages in thread
From: Daniel Baluta @ 2026-08-12 13:51 UTC (permalink / raw)
To: phucduc.bui, Frank Li, Liam Girdwood, Mark Brown,
Jaroslav Kysela, Takashi Iwai, Sascha Hauer,
Pengutronix Kernel Team
Cc: Fabio Estevam, Michael Trimarchi, Dario Binacchi, imx,
linux-arm-kernel, linux-sound, linux-kernel
On 8/12/26 13:14, phucduc.bui@gmail.com wrote:
> 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>
This looks to be OK. Indeed at various points snd_soc_of_parse_audio_routing prints
an error message if it gets into trouble.
Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>
> ---
> sound/soc/mxs/mxs-sgtl5000.c | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/sound/soc/mxs/mxs-sgtl5000.c b/sound/soc/mxs/mxs-sgtl5000.c
> index f1c0e612313d..a253a48ca59c 100644
> --- a/sound/soc/mxs/mxs-sgtl5000.c
> +++ b/sound/soc/mxs/mxs-sgtl5000.c
> @@ -155,8 +155,6 @@ static int mxs_sgtl5000_probe(struct platform_device *pdev)
>
> ret = snd_soc_of_parse_audio_routing(card, "audio-routing");
> if (ret) {
> - dev_err(&pdev->dev, "failed to parse audio-routing (%d)\n",
> - ret);
> mxs_saif_put_mclk(0);
> return ret;
> }
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 3/3] ASoC: mxs-sgtl5000: Drop redundant probe error messages
2026-08-12 10:14 ` [PATCH 3/3] ASoC: mxs-sgtl5000: " phucduc.bui
2026-08-12 13:51 ` Daniel Baluta
@ 2026-08-12 14:15 ` Frank Li
1 sibling, 0 replies; 8+ messages in thread
From: Frank Li @ 2026-08-12 14:15 UTC (permalink / raw)
To: phucduc.bui
Cc: Frank Li, Liam Girdwood, Mark Brown, Jaroslav Kysela,
Takashi Iwai, Sascha Hauer, Pengutronix Kernel Team,
Fabio Estevam, Michael Trimarchi, Dario Binacchi, imx,
linux-arm-kernel, linux-sound, linux-kernel
On Wed, Aug 12, 2026 at 05:14:18PM +0700, phucduc.bui@gmail.com wrote:
> 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>
> ---
Reviewed-by: Frank Li <Frank.Li@nxp.com>
> sound/soc/mxs/mxs-sgtl5000.c | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/sound/soc/mxs/mxs-sgtl5000.c b/sound/soc/mxs/mxs-sgtl5000.c
> index f1c0e612313d..a253a48ca59c 100644
> --- a/sound/soc/mxs/mxs-sgtl5000.c
> +++ b/sound/soc/mxs/mxs-sgtl5000.c
> @@ -155,8 +155,6 @@ static int mxs_sgtl5000_probe(struct platform_device *pdev)
>
> ret = snd_soc_of_parse_audio_routing(card, "audio-routing");
> if (ret) {
> - dev_err(&pdev->dev, "failed to parse audio-routing (%d)\n",
> - ret);
> mxs_saif_put_mclk(0);
> return ret;
> }
> --
> 2.43.0
>
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 1/3] ASoC: mxs-saif: Use dev_err_probe() for error handling
2026-08-12 10:14 ` [PATCH 1/3] ASoC: mxs-saif: Use dev_err_probe() for " phucduc.bui
@ 2026-08-12 14:17 ` Frank Li
0 siblings, 0 replies; 8+ messages in thread
From: Frank Li @ 2026-08-12 14:17 UTC (permalink / raw)
To: phucduc.bui
Cc: Frank Li, Liam Girdwood, Mark Brown, Jaroslav Kysela,
Takashi Iwai, Sascha Hauer, Pengutronix Kernel Team,
Fabio Estevam, Michael Trimarchi, Dario Binacchi, imx,
linux-arm-kernel, linux-sound, linux-kernel
On Wed, Aug 12, 2026 at 05:14:16PM +0700, phucduc.bui@gmail.com wrote:
> 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>
> ---
Reviewed-by: Frank Li <Frank.Li@nxp.com>
> sound/soc/mxs/mxs-saif.c | 9 +++------
> 1 file changed, 3 insertions(+), 6 deletions(-)
>
> diff --git a/sound/soc/mxs/mxs-saif.c b/sound/soc/mxs/mxs-saif.c
> index a01a680ad4d7..b877c978a04c 100644
> --- a/sound/soc/mxs/mxs-saif.c
> +++ b/sound/soc/mxs/mxs-saif.c
> @@ -826,12 +826,9 @@ static int mxs_saif_probe(struct platform_device *pdev)
> mxs_saif[saif->id] = saif;
>
> saif->clk = devm_clk_get(&pdev->dev, NULL);
> - if (IS_ERR(saif->clk)) {
> - ret = PTR_ERR(saif->clk);
> - dev_err(&pdev->dev, "Cannot get the clock: %d\n",
> - ret);
> - return ret;
> - }
> + if (IS_ERR(saif->clk))
> + return dev_err_probe(&pdev->dev, PTR_ERR(saif->clk),
> + "Cannot get the clock\n");
>
> saif->base = devm_platform_ioremap_resource(pdev, 0);
> if (IS_ERR(saif->base))
> --
> 2.43.0
>
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 0/3] ASoC: mxs: Improve probe error handling
2026-08-12 10:14 [PATCH 0/3] ASoC: mxs: Improve probe error handling phucduc.bui
` (2 preceding siblings ...)
2026-08-12 10:14 ` [PATCH 3/3] ASoC: mxs-sgtl5000: " phucduc.bui
@ 2026-08-12 17:40 ` Mark Brown
3 siblings, 0 replies; 8+ messages in thread
From: Mark Brown @ 2026-08-12 17:40 UTC (permalink / raw)
To: Frank Li, Liam Girdwood, Jaroslav Kysela, Takashi Iwai,
Sascha Hauer, Pengutronix Kernel Team, phucduc.bui
Cc: Fabio Estevam, Michael Trimarchi, Dario Binacchi, imx,
linux-arm-kernel, linux-sound, linux-kernel
On Wed, 12 Aug 2026 17:14:15 +0700, phucduc.bui@gmail.com wrote:
> ASoC: mxs: Improve probe error handling
>
> From: bui duc phuc <phucduc.bui@gmail.com>
>
> Hi all,
>
> This series improves probe error handling in the MXS ASoC drivers.
> Use dev_err_probe() where appropriate and remove redundant dev_err() calls
> when the corresponding errors are already reported by the called functions
> or further down the call chain.
>
> [...]
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-7.3
Thanks!
[1/3] ASoC: mxs-saif: Use dev_err_probe() for error handling
https://git.kernel.org/broonie/sound/c/b215caca714e
[2/3] ASoC: mxs-saif: Drop redundant probe error messages
https://git.kernel.org/broonie/sound/c/f0701e5fc299
[3/3] ASoC: mxs-sgtl5000: Drop redundant probe error messages
https://git.kernel.org/broonie/sound/c/e84c06775d4a
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
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2026-08-13 11:37 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-08-12 10:14 [PATCH 0/3] ASoC: mxs: Improve probe error handling phucduc.bui
2026-08-12 10:14 ` [PATCH 1/3] ASoC: mxs-saif: Use dev_err_probe() for " phucduc.bui
2026-08-12 14:17 ` Frank Li
2026-08-12 10:14 ` [PATCH 2/3] ASoC: mxs-saif: Drop redundant probe error messages phucduc.bui
2026-08-12 10:14 ` [PATCH 3/3] ASoC: mxs-sgtl5000: " phucduc.bui
2026-08-12 13:51 ` Daniel Baluta
2026-08-12 14:15 ` Frank Li
2026-08-12 17:40 ` [PATCH 0/3] ASoC: mxs: Improve probe error handling Mark Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®