public inbox for linux-tegra@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 00/14] ASoC: tegra: Add error logging for probe and callback failures
@ 2026-03-25 10:14 Sheetal
  2026-03-25 10:14 ` [PATCH v3 01/14] ASoC: tegra: Use dev_err_probe() in tegra186_asrc probe Sheetal
                   ` (14 more replies)
  0 siblings, 15 replies; 22+ messages in thread
From: Sheetal @ 2026-03-25 10:14 UTC (permalink / raw)
  To: Liam Girdwood, Mark Brown, Thierry Reding, Jonathan Hunter
  Cc: Jaroslav Kysela, Takashi Iwai, Mohan Kumar, Kuninori Morimoto,
	linux-sound, linux-tegra, linux-kernel, Sheetal

Log errors in probe and runtime error paths across Tegra audio drivers.
Use dev_err_probe() in probe paths and dev_err() in runtime callbacks.
Skip redundant logging where the underlying API already reports errors.

Changes in v3:
- Split single patch into per-driver patch series for easier review
  and incremental merging.
- Drop dev_err() from tegra_ahub_put_value_enum() since the error path
  is userspace-triggerable and would allow log spamming.
- Drop dev_err() from tegra210_mixer_set_audio_cif() since the driver
  advertises S8 format support but this function doesn't handle it,
  creating a userspace-triggerable log spam path.

Changes in v2:
- Use dev_err_probe() in all probe error paths as a defensive measure,
  instead of only where -EPROBE_DEFER is currently known to be returned.
- Drop redundant error logging for devm_platform_ioremap_resource() and
  devm_ioremap_resource() since these APIs already log errors internally.

Sheetal (14):
  ASoC: tegra: Use dev_err_probe() in tegra186_asrc probe
  ASoC: tegra: Use dev_err_probe() in tegra186_dspk probe
  ASoC: tegra: Add error logging in tegra210_admaif driver
  ASoC: tegra: Add error logging in tegra210_adx driver
  ASoC: tegra: Use dev_err_probe() in tegra210_ahub probe
  ASoC: tegra: Add error logging in tegra210_amx driver
  ASoC: tegra: Use dev_err_probe() in tegra210_dmic probe
  ASoC: tegra: Add error logging in tegra210_i2s driver
  ASoC: tegra: Use dev_err_probe() in OPE, PEQ and MBDRC drivers
  ASoC: tegra: Use dev_err_probe() in tegra210_mixer probe
  ASoC: tegra: Use dev_err_probe() in tegra210_mvc probe
  ASoC: tegra: Use dev_err_probe() in tegra210_sfc probe
  ASoC: tegra: Use dev_err_probe() in tegra_asoc_machine probe
  ASoC: tegra: Use dev_err_probe() in tegra_audio_graph_card probe

 sound/soc/tegra/tegra186_asrc.c          |  7 ++--
 sound/soc/tegra/tegra186_dspk.c          | 15 +++----
 sound/soc/tegra/tegra210_admaif.c        | 18 ++++----
 sound/soc/tegra/tegra210_adx.c           | 13 +++---
 sound/soc/tegra/tegra210_ahub.c          | 18 ++++----
 sound/soc/tegra/tegra210_amx.c           |  9 ++--
 sound/soc/tegra/tegra210_dmic.c          | 14 +++----
 sound/soc/tegra/tegra210_i2s.c           | 18 ++++----
 sound/soc/tegra/tegra210_mbdrc.c         | 10 ++---
 sound/soc/tegra/tegra210_mixer.c         |  7 ++--
 sound/soc/tegra/tegra210_mvc.c           |  7 ++--
 sound/soc/tegra/tegra210_ope.c           | 19 ++++-----
 sound/soc/tegra/tegra210_peq.c           | 10 ++---
 sound/soc/tegra/tegra210_sfc.c           |  7 ++--
 sound/soc/tegra/tegra_asoc_machine.c     | 70 ++++++++++++++++----------------
 sound/soc/tegra/tegra_audio_graph_card.c | 21 ++++++----
 16 files changed, 128 insertions(+), 135 deletions(-)

-- 
2.17.1


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

* [PATCH v3 01/14] ASoC: tegra: Use dev_err_probe() in tegra186_asrc probe
  2026-03-25 10:14 [PATCH v3 00/14] ASoC: tegra: Add error logging for probe and callback failures Sheetal
@ 2026-03-25 10:14 ` Sheetal
  2026-03-25 13:03   ` Mark Brown
  2026-03-25 10:14 ` [PATCH v3 02/14] ASoC: tegra: Use dev_err_probe() in tegra186_dspk probe Sheetal
                   ` (13 subsequent siblings)
  14 siblings, 1 reply; 22+ messages in thread
From: Sheetal @ 2026-03-25 10:14 UTC (permalink / raw)
  To: Liam Girdwood, Mark Brown, Thierry Reding, Jonathan Hunter
  Cc: Jaroslav Kysela, Takashi Iwai, Mohan Kumar, Kuninori Morimoto,
	linux-sound, linux-tegra, linux-kernel, Sheetal

Log errors in the Tegra186 ASRC probe path using dev_err_probe().

Signed-off-by: Sheetal <sheetal@nvidia.com>
---
 sound/soc/tegra/tegra186_asrc.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/sound/soc/tegra/tegra186_asrc.c b/sound/soc/tegra/tegra186_asrc.c
index d2a5ec7c54cc..98e911e2ed74 100644
--- a/sound/soc/tegra/tegra186_asrc.c
+++ b/sound/soc/tegra/tegra186_asrc.c
@@ -1016,10 +1016,9 @@ static int tegra186_asrc_platform_probe(struct platform_device *pdev)
 	err = devm_snd_soc_register_component(dev, &tegra186_asrc_cmpnt,
 					      tegra186_asrc_dais,
 					      ARRAY_SIZE(tegra186_asrc_dais));
-	if (err) {
-		dev_err(dev, "can't register ASRC component, err: %d\n", err);
-		return err;
-	}
+	if (err)
+		return dev_err_probe(dev, err,
+				     "can't register ASRC component\n");
 
 	pm_runtime_enable(dev);
 
-- 
2.17.1


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

* [PATCH v3 02/14] ASoC: tegra: Use dev_err_probe() in tegra186_dspk probe
  2026-03-25 10:14 [PATCH v3 00/14] ASoC: tegra: Add error logging for probe and callback failures Sheetal
  2026-03-25 10:14 ` [PATCH v3 01/14] ASoC: tegra: Use dev_err_probe() in tegra186_asrc probe Sheetal
@ 2026-03-25 10:14 ` Sheetal
  2026-03-25 10:14 ` [PATCH v3 03/14] ASoC: tegra: Add error logging in tegra210_admaif driver Sheetal
                   ` (12 subsequent siblings)
  14 siblings, 0 replies; 22+ messages in thread
From: Sheetal @ 2026-03-25 10:14 UTC (permalink / raw)
  To: Liam Girdwood, Mark Brown, Thierry Reding, Jonathan Hunter
  Cc: Jaroslav Kysela, Takashi Iwai, Mohan Kumar, Kuninori Morimoto,
	linux-sound, linux-tegra, linux-kernel, Sheetal

Log errors in the Tegra186 DSPK probe path using dev_err_probe().

Signed-off-by: Sheetal <sheetal@nvidia.com>
---
 sound/soc/tegra/tegra186_dspk.c | 15 ++++++--------
 1 file changed, 6 insertions(+), 9 deletions(-)

diff --git a/sound/soc/tegra/tegra186_dspk.c b/sound/soc/tegra/tegra186_dspk.c
index 8816e4967331..1aa94c98294a 100644
--- a/sound/soc/tegra/tegra186_dspk.c
+++ b/sound/soc/tegra/tegra186_dspk.c
@@ -496,10 +496,9 @@ static int tegra186_dspk_platform_probe(struct platform_device *pdev)
 	dev_set_drvdata(dev, dspk);
 
 	dspk->clk_dspk = devm_clk_get(dev, "dspk");
-	if (IS_ERR(dspk->clk_dspk)) {
-		dev_err(dev, "can't retrieve DSPK clock\n");
-		return PTR_ERR(dspk->clk_dspk);
-	}
+	if (IS_ERR(dspk->clk_dspk))
+		return dev_err_probe(dev, PTR_ERR(dspk->clk_dspk),
+				     "can't retrieve DSPK clock\n");
 
 	regs = devm_platform_ioremap_resource(pdev, 0);
 	if (IS_ERR(regs))
@@ -516,11 +515,9 @@ static int tegra186_dspk_platform_probe(struct platform_device *pdev)
 	err = devm_snd_soc_register_component(dev, &tegra186_dspk_cmpnt,
 					      tegra186_dspk_dais,
 					      ARRAY_SIZE(tegra186_dspk_dais));
-	if (err) {
-		dev_err(dev, "can't register DSPK component, err: %d\n",
-			err);
-		return err;
-	}
+	if (err)
+		return dev_err_probe(dev, err,
+				     "can't register DSPK component\n");
 
 	pm_runtime_enable(dev);
 
-- 
2.17.1


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

* [PATCH v3 03/14] ASoC: tegra: Add error logging in tegra210_admaif driver
  2026-03-25 10:14 [PATCH v3 00/14] ASoC: tegra: Add error logging for probe and callback failures Sheetal
  2026-03-25 10:14 ` [PATCH v3 01/14] ASoC: tegra: Use dev_err_probe() in tegra186_asrc probe Sheetal
  2026-03-25 10:14 ` [PATCH v3 02/14] ASoC: tegra: Use dev_err_probe() in tegra186_dspk probe Sheetal
@ 2026-03-25 10:14 ` Sheetal
  2026-03-25 13:05   ` Mark Brown
  2026-03-25 10:14 ` [PATCH v3 04/14] ASoC: tegra: Add error logging in tegra210_adx driver Sheetal
                   ` (11 subsequent siblings)
  14 siblings, 1 reply; 22+ messages in thread
From: Sheetal @ 2026-03-25 10:14 UTC (permalink / raw)
  To: Liam Girdwood, Mark Brown, Thierry Reding, Jonathan Hunter
  Cc: Jaroslav Kysela, Takashi Iwai, Mohan Kumar, Kuninori Morimoto,
	linux-sound, linux-tegra, linux-kernel, Sheetal

Log errors in the Tegra210 ADMAIF probe and runtime callback paths.

Signed-off-by: Sheetal <sheetal@nvidia.com>
---
 sound/soc/tegra/tegra210_admaif.c | 18 ++++++++++--------
 1 file changed, 10 insertions(+), 8 deletions(-)

diff --git a/sound/soc/tegra/tegra210_admaif.c b/sound/soc/tegra/tegra210_admaif.c
index 0976779d29f2..5d690a2f8509 100644
--- a/sound/soc/tegra/tegra210_admaif.c
+++ b/sound/soc/tegra/tegra210_admaif.c
@@ -408,6 +408,7 @@ static int tegra_admaif_start(struct snd_soc_dai *dai, int direction)
 		reg = CH_RX_REG(TEGRA_ADMAIF_RX_ENABLE, dai->id);
 		break;
 	default:
+		dev_err(dai->dev, "invalid stream direction: %d\n", direction);
 		return -EINVAL;
 	}
 
@@ -441,6 +442,7 @@ static int tegra_admaif_stop(struct snd_soc_dai *dai, int direction)
 		reset_reg = CH_RX_REG(TEGRA_ADMAIF_RX_SOFT_RESET, dai->id);
 		break;
 	default:
+		dev_err(dai->dev, "invalid stream direction: %d\n", direction);
 		return -EINVAL;
 	}
 
@@ -489,6 +491,7 @@ static int tegra_admaif_trigger(struct snd_pcm_substream *substream, int cmd,
 	case SNDRV_PCM_TRIGGER_SUSPEND:
 		return tegra_admaif_stop(dai, substream->stream);
 	default:
+		dev_err(dai->dev, "invalid trigger command: %d\n", cmd);
 		return -EINVAL;
 	}
 }
@@ -966,10 +969,9 @@ static int tegra_admaif_probe(struct platform_device *pdev)
 	regcache_cache_only(admaif->regmap, true);
 
 	err = tegra_isomgr_adma_register(&pdev->dev);
-	if (err) {
-		dev_err(&pdev->dev, "Failed to add interconnect path\n");
-		return err;
-	}
+	if (err)
+		return dev_err_probe(&pdev->dev, err,
+				     "failed to add interconnect path\n");
 
 	regmap_update_bits(admaif->regmap, admaif->soc_data->global_base +
 			   TEGRA_ADMAIF_GLOBAL_ENABLE, 1, 1);
@@ -1009,11 +1011,9 @@ static int tegra_admaif_probe(struct platform_device *pdev)
 					      admaif->soc_data->cmpnt,
 					      admaif->soc_data->dais,
 					      admaif->soc_data->num_ch);
-	if (err) {
-		dev_err(&pdev->dev,
-			"can't register ADMAIF component, err: %d\n", err);
-		return err;
-	}
+	if (err)
+		return dev_err_probe(&pdev->dev, err,
+				     "can't register ADMAIF component\n");
 
 	pm_runtime_enable(&pdev->dev);
 
-- 
2.17.1


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

* [PATCH v3 04/14] ASoC: tegra: Add error logging in tegra210_adx driver
  2026-03-25 10:14 [PATCH v3 00/14] ASoC: tegra: Add error logging for probe and callback failures Sheetal
                   ` (2 preceding siblings ...)
  2026-03-25 10:14 ` [PATCH v3 03/14] ASoC: tegra: Add error logging in tegra210_admaif driver Sheetal
@ 2026-03-25 10:14 ` Sheetal
  2026-03-25 10:14 ` [PATCH v3 05/14] ASoC: tegra: Use dev_err_probe() in tegra210_ahub probe Sheetal
                   ` (10 subsequent siblings)
  14 siblings, 0 replies; 22+ messages in thread
From: Sheetal @ 2026-03-25 10:14 UTC (permalink / raw)
  To: Liam Girdwood, Mark Brown, Thierry Reding, Jonathan Hunter
  Cc: Jaroslav Kysela, Takashi Iwai, Mohan Kumar, Kuninori Morimoto,
	linux-sound, linux-tegra, linux-kernel, Sheetal

Log errors in the Tegra210 ADX probe and set_audio_cif paths.

Signed-off-by: Sheetal <sheetal@nvidia.com>
---
 sound/soc/tegra/tegra210_adx.c | 13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)

diff --git a/sound/soc/tegra/tegra210_adx.c b/sound/soc/tegra/tegra210_adx.c
index 95875c75ddf8..d7d075fd54b2 100644
--- a/sound/soc/tegra/tegra210_adx.c
+++ b/sound/soc/tegra/tegra210_adx.c
@@ -134,8 +134,11 @@ static int tegra210_adx_set_audio_cif(struct snd_soc_dai *dai,
 
 	memset(&cif_conf, 0, sizeof(struct tegra_cif_conf));
 
-	if (channels < 1 || channels > adx->soc_data->max_ch)
+	if (channels < 1 || channels > adx->soc_data->max_ch) {
+		dev_err(dai->dev, "invalid channels: %u (max %u)\n",
+			channels, adx->soc_data->max_ch);
 		return -EINVAL;
+	}
 
 	switch (format) {
 	case SNDRV_PCM_FORMAT_S8:
@@ -149,6 +152,7 @@ static int tegra210_adx_set_audio_cif(struct snd_soc_dai *dai,
 		audio_bits = TEGRA_ACIF_BITS_32;
 		break;
 	default:
+		dev_err(dai->dev, "unsupported format: %d\n", format);
 		return -EINVAL;
 	}
 
@@ -717,10 +721,9 @@ static int tegra210_adx_platform_probe(struct platform_device *pdev)
 	err = devm_snd_soc_register_component(dev, &tegra210_adx_cmpnt,
 					      tegra210_adx_dais,
 					      ARRAY_SIZE(tegra210_adx_dais));
-	if (err) {
-		dev_err(dev, "can't register ADX component, err: %d\n", err);
-		return err;
-	}
+	if (err)
+		return dev_err_probe(dev, err,
+				     "can't register ADX component\n");
 
 	pm_runtime_enable(dev);
 
-- 
2.17.1


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

* [PATCH v3 05/14] ASoC: tegra: Use dev_err_probe() in tegra210_ahub probe
  2026-03-25 10:14 [PATCH v3 00/14] ASoC: tegra: Add error logging for probe and callback failures Sheetal
                   ` (3 preceding siblings ...)
  2026-03-25 10:14 ` [PATCH v3 04/14] ASoC: tegra: Add error logging in tegra210_adx driver Sheetal
@ 2026-03-25 10:14 ` Sheetal
  2026-03-25 13:07   ` Mark Brown
  2026-03-25 10:14 ` [PATCH v3 06/14] ASoC: tegra: Add error logging in tegra210_amx driver Sheetal
                   ` (9 subsequent siblings)
  14 siblings, 1 reply; 22+ messages in thread
From: Sheetal @ 2026-03-25 10:14 UTC (permalink / raw)
  To: Liam Girdwood, Mark Brown, Thierry Reding, Jonathan Hunter
  Cc: Jaroslav Kysela, Takashi Iwai, Mohan Kumar, Kuninori Morimoto,
	linux-sound, linux-tegra, linux-kernel, Sheetal

Log errors in the Tegra210 AHUB probe path using dev_err_probe().

Signed-off-by: Sheetal <sheetal@nvidia.com>
---
 sound/soc/tegra/tegra210_ahub.c | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/sound/soc/tegra/tegra210_ahub.c b/sound/soc/tegra/tegra210_ahub.c
index 43a45f785d5b..4626dd0a4d55 100644
--- a/sound/soc/tegra/tegra210_ahub.c
+++ b/sound/soc/tegra/tegra210_ahub.c
@@ -2265,10 +2265,9 @@ static int tegra_ahub_probe(struct platform_device *pdev)
 	platform_set_drvdata(pdev, ahub);
 
 	ahub->clk = devm_clk_get(&pdev->dev, "ahub");
-	if (IS_ERR(ahub->clk)) {
-		dev_err(&pdev->dev, "can't retrieve AHUB clock\n");
-		return PTR_ERR(ahub->clk);
-	}
+	if (IS_ERR(ahub->clk))
+		return dev_err_probe(&pdev->dev, PTR_ERR(ahub->clk),
+				     "can't retrieve AHUB clock\n");
 
 	regs = devm_platform_ioremap_resource(pdev, 0);
 	if (IS_ERR(regs))
@@ -2287,16 +2286,15 @@ static int tegra_ahub_probe(struct platform_device *pdev)
 					      ahub->soc_data->cmpnt_drv,
 					      ahub->soc_data->dai_drv,
 					      ahub->soc_data->num_dais);
-	if (err) {
-		dev_err(&pdev->dev, "can't register AHUB component, err: %d\n",
-			err);
-		return err;
-	}
+	if (err)
+		return dev_err_probe(&pdev->dev, err,
+				     "can't register AHUB component\n");
 
 	pm_runtime_enable(&pdev->dev);
 
 	err = of_platform_populate(pdev->dev.of_node, NULL, NULL, &pdev->dev);
 	if (err) {
 		pm_runtime_disable(&pdev->dev);
-		return err;
+		return dev_err_probe(&pdev->dev, err,
+				     "failed to populate child nodes\n");
 	}
-- 
2.17.1


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

* [PATCH v3 06/14] ASoC: tegra: Add error logging in tegra210_amx driver
  2026-03-25 10:14 [PATCH v3 00/14] ASoC: tegra: Add error logging for probe and callback failures Sheetal
                   ` (4 preceding siblings ...)
  2026-03-25 10:14 ` [PATCH v3 05/14] ASoC: tegra: Use dev_err_probe() in tegra210_ahub probe Sheetal
@ 2026-03-25 10:14 ` Sheetal
  2026-03-25 10:14 ` [PATCH v3 07/14] ASoC: tegra: Use dev_err_probe() in tegra210_dmic probe Sheetal
                   ` (8 subsequent siblings)
  14 siblings, 0 replies; 22+ messages in thread
From: Sheetal @ 2026-03-25 10:14 UTC (permalink / raw)
  To: Liam Girdwood, Mark Brown, Thierry Reding, Jonathan Hunter
  Cc: Jaroslav Kysela, Takashi Iwai, Mohan Kumar, Kuninori Morimoto,
	linux-sound, linux-tegra, linux-kernel, Sheetal

Log errors in the Tegra210 AMX probe and set_audio_cif paths.

Signed-off-by: Sheetal <sheetal@nvidia.com>
---
 sound/soc/tegra/tegra210_amx.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/sound/soc/tegra/tegra210_amx.c b/sound/soc/tegra/tegra210_amx.c
index bfda82505298..1b7fb84a0f34 100644
--- a/sound/soc/tegra/tegra210_amx.c
+++ b/sound/soc/tegra/tegra210_amx.c
@@ -163,6 +163,8 @@ static int tegra210_amx_set_audio_cif(struct snd_soc_dai *dai,
 		audio_bits = TEGRA_ACIF_BITS_32;
 		break;
 	default:
+		dev_err(dai->dev, "unsupported format: %d\n",
+			params_format(params));
 		return -EINVAL;
 	}
 
@@ -767,10 +769,9 @@ static int tegra210_amx_platform_probe(struct platform_device *pdev)
 	err = devm_snd_soc_register_component(dev, &tegra210_amx_cmpnt,
 					      tegra210_amx_dais,
 					      ARRAY_SIZE(tegra210_amx_dais));
-	if (err) {
-		dev_err(dev, "can't register AMX component, err: %d\n", err);
-		return err;
-	}
+	if (err)
+		return dev_err_probe(dev, err,
+				     "can't register AMX component\n");
 
 	pm_runtime_enable(dev);
 
-- 
2.17.1


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

* [PATCH v3 07/14] ASoC: tegra: Use dev_err_probe() in tegra210_dmic probe
  2026-03-25 10:14 [PATCH v3 00/14] ASoC: tegra: Add error logging for probe and callback failures Sheetal
                   ` (5 preceding siblings ...)
  2026-03-25 10:14 ` [PATCH v3 06/14] ASoC: tegra: Add error logging in tegra210_amx driver Sheetal
@ 2026-03-25 10:14 ` Sheetal
  2026-03-25 13:08   ` Mark Brown
  2026-03-25 10:14 ` [PATCH v3 08/14] ASoC: tegra: Add error logging in tegra210_i2s driver Sheetal
                   ` (7 subsequent siblings)
  14 siblings, 1 reply; 22+ messages in thread
From: Sheetal @ 2026-03-25 10:14 UTC (permalink / raw)
  To: Liam Girdwood, Mark Brown, Thierry Reding, Jonathan Hunter
  Cc: Jaroslav Kysela, Takashi Iwai, Mohan Kumar, Kuninori Morimoto,
	linux-sound, linux-tegra, linux-kernel, Sheetal

Log errors in the Tegra210 DMIC probe path using dev_err_probe().

Signed-off-by: Sheetal <sheetal@nvidia.com>
---
 sound/soc/tegra/tegra210_dmic.c | 14 ++++++--------
 1 file changed, 6 insertions(+), 8 deletions(-)

diff --git a/sound/soc/tegra/tegra210_dmic.c b/sound/soc/tegra/tegra210_dmic.c
index 93def7ac4fde..5a4bd5cef30a 100644
--- a/sound/soc/tegra/tegra210_dmic.c
+++ b/sound/soc/tegra/tegra210_dmic.c
@@ -507,10 +507,9 @@ static int tegra210_dmic_probe(struct platform_device *pdev)
 	dev_set_drvdata(dev, dmic);
 
 	dmic->clk_dmic = devm_clk_get(dev, "dmic");
-	if (IS_ERR(dmic->clk_dmic)) {
-		dev_err(dev, "can't retrieve DMIC clock\n");
-		return PTR_ERR(dmic->clk_dmic);
-	}
+	if (IS_ERR(dmic->clk_dmic))
+		return dev_err_probe(dev, PTR_ERR(dmic->clk_dmic),
+				     "can't retrieve DMIC clock\n");
 
 	regs = devm_platform_ioremap_resource(pdev, 0);
 	if (IS_ERR(regs))
@@ -528,10 +527,9 @@ static int tegra210_dmic_probe(struct platform_device *pdev)
 	err = devm_snd_soc_register_component(dev, &tegra210_dmic_compnt,
 					      tegra210_dmic_dais,
 					      ARRAY_SIZE(tegra210_dmic_dais));
-	if (err) {
-		dev_err(dev, "can't register DMIC component, err: %d\n", err);
-		return err;
-	}
+	if (err)
+		return dev_err_probe(dev, err,
+				     "can't register DMIC component\n");
 
 	pm_runtime_enable(dev);
 
-- 
2.17.1


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

* [PATCH v3 08/14] ASoC: tegra: Add error logging in tegra210_i2s driver
  2026-03-25 10:14 [PATCH v3 00/14] ASoC: tegra: Add error logging for probe and callback failures Sheetal
                   ` (6 preceding siblings ...)
  2026-03-25 10:14 ` [PATCH v3 07/14] ASoC: tegra: Use dev_err_probe() in tegra210_dmic probe Sheetal
@ 2026-03-25 10:14 ` Sheetal
  2026-03-25 10:14 ` [PATCH v3 09/14] ASoC: tegra: Use dev_err_probe() in OPE, PEQ and MBDRC drivers Sheetal
                   ` (6 subsequent siblings)
  14 siblings, 0 replies; 22+ messages in thread
From: Sheetal @ 2026-03-25 10:14 UTC (permalink / raw)
  To: Liam Girdwood, Mark Brown, Thierry Reding, Jonathan Hunter
  Cc: Jaroslav Kysela, Takashi Iwai, Mohan Kumar, Kuninori Morimoto,
	linux-sound, linux-tegra, linux-kernel, Sheetal

Log errors in the Tegra210 I2S probe and runtime callback paths.

Signed-off-by: Sheetal <sheetal@nvidia.com>
---
 sound/soc/tegra/tegra210_i2s.c | 18 ++++++++++--------
 1 file changed, 10 insertions(+), 8 deletions(-)

diff --git a/sound/soc/tegra/tegra210_i2s.c b/sound/soc/tegra/tegra210_i2s.c
index d8e02f0a3025..7bf76c9b640f 100644
--- a/sound/soc/tegra/tegra210_i2s.c
+++ b/sound/soc/tegra/tegra210_i2s.c
@@ -161,6 +161,7 @@ static int tegra210_i2s_init(struct snd_soc_dapm_widget *w,
 		stream = SNDRV_PCM_STREAM_CAPTURE;
 		status_reg = TEGRA210_I2S_TX_STATUS + i2s->soc_data->tx_offset;
 	} else {
+		dev_err(dev, "invalid I2S direction register 0x%x\n", w->reg);
 		return -EINVAL;
 	}
 
@@ -235,6 +236,7 @@ static int tegra210_i2s_set_fmt(struct snd_soc_dai *dai,
 		val = I2S_CTRL_MASTER_EN;
 		break;
 	default:
+		dev_err(dai->dev, "invalid clock provider format 0x%x\n", fmt);
 		return -EINVAL;
 	}
 
@@ -270,6 +272,7 @@ static int tegra210_i2s_set_fmt(struct snd_soc_dai *dai,
 		tegra210_i2s_set_data_offset(i2s, 0);
 		break;
 	default:
+		dev_err(dai->dev, "invalid I2S frame format 0x%x\n", fmt);
 		return -EINVAL;
 	}
 
@@ -290,6 +293,7 @@ static int tegra210_i2s_set_fmt(struct snd_soc_dai *dai,
 		val ^= I2S_CTRL_LRCK_POL_MASK;
 		break;
 	default:
+		dev_err(dai->dev, "invalid I2S clock inversion 0x%x\n", fmt);
 		return -EINVAL;
 	}
 
@@ -1070,10 +1074,9 @@ static int tegra210_i2s_probe(struct platform_device *pdev)
 	dev_set_drvdata(dev, i2s);
 
 	i2s->clk_i2s = devm_clk_get(dev, "i2s");
-	if (IS_ERR(i2s->clk_i2s)) {
-		dev_err(dev, "can't retrieve I2S bit clock\n");
-		return PTR_ERR(i2s->clk_i2s);
-	}
+	if (IS_ERR(i2s->clk_i2s))
+		return dev_err_probe(dev, PTR_ERR(i2s->clk_i2s),
+				     "can't retrieve I2S bit clock\n");
 
 	/*
 	 * Not an error, as this clock is needed only when some other I/O
@@ -1108,10 +1111,9 @@ static int tegra210_i2s_probe(struct platform_device *pdev)
 	err = devm_snd_soc_register_component(dev, i2s->soc_data->i2s_cmpnt,
 					      tegra210_i2s_dais,
 					      ARRAY_SIZE(tegra210_i2s_dais));
-	if (err) {
-		dev_err(dev, "can't register I2S component, err: %d\n", err);
-		return err;
-	}
+	if (err)
+		return dev_err_probe(dev, err,
+				     "can't register I2S component\n");
 
 	pm_runtime_enable(dev);
 
-- 
2.17.1


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

* [PATCH v3 09/14] ASoC: tegra: Use dev_err_probe() in OPE, PEQ and MBDRC drivers
  2026-03-25 10:14 [PATCH v3 00/14] ASoC: tegra: Add error logging for probe and callback failures Sheetal
                   ` (7 preceding siblings ...)
  2026-03-25 10:14 ` [PATCH v3 08/14] ASoC: tegra: Add error logging in tegra210_i2s driver Sheetal
@ 2026-03-25 10:14 ` Sheetal
  2026-03-25 13:10   ` Mark Brown
  2026-03-25 10:14 ` [PATCH v3 10/14] ASoC: tegra: Use dev_err_probe() in tegra210_mixer probe Sheetal
                   ` (5 subsequent siblings)
  14 siblings, 1 reply; 22+ messages in thread
From: Sheetal @ 2026-03-25 10:14 UTC (permalink / raw)
  To: Liam Girdwood, Mark Brown, Thierry Reding, Jonathan Hunter
  Cc: Jaroslav Kysela, Takashi Iwai, Mohan Kumar, Kuninori Morimoto,
	linux-sound, linux-tegra, linux-kernel, Sheetal

Log errors in the Tegra210 OPE, PEQ and MBDRC probe paths using
dev_err_probe().

Signed-off-by: Sheetal <sheetal@nvidia.com>
---
 sound/soc/tegra/tegra210_mbdrc.c | 10 +++++-----
 sound/soc/tegra/tegra210_ope.c   | 19 ++++++++-----------
 sound/soc/tegra/tegra210_peq.c   | 10 +++++-----
 3 files changed, 18 insertions(+), 21 deletions(-)

diff --git a/sound/soc/tegra/tegra210_mbdrc.c b/sound/soc/tegra/tegra210_mbdrc.c
index 6a268dbb7197..558b7a21b0be 100644
--- a/sound/soc/tegra/tegra210_mbdrc.c
+++ b/sound/soc/tegra/tegra210_mbdrc.c
@@ -987,8 +987,9 @@ int tegra210_mbdrc_regmap_init(struct platform_device *pdev)
 	int err;
 
 	child = of_get_child_by_name(dev->of_node, "dynamic-range-compressor");
 	if (!child)
-		return -ENODEV;
+		return dev_err_probe(dev, -ENODEV,
+				     "missing 'dynamic-range-compressor' DT child node\n");
 
 	err = of_address_to_resource(child, 0, &mem);
 	of_node_put(child);
@@ -1004,7 +1005,6 @@ int tegra210_mbdrc_regmap_init(struct platform_device *pdev)
 	ope->mbdrc_regmap = devm_regmap_init_mmio(dev, regs,
 						  &tegra210_mbdrc_regmap_cfg);
-	if (IS_ERR(ope->mbdrc_regmap)) {
-		dev_err(dev, "regmap init failed\n");
-		return PTR_ERR(ope->mbdrc_regmap);
-	}
+	if (IS_ERR(ope->mbdrc_regmap))
+		return dev_err_probe(dev, PTR_ERR(ope->mbdrc_regmap),
+				     "MBDRC regmap init failed\n");
 
diff --git a/sound/soc/tegra/tegra210_ope.c b/sound/soc/tegra/tegra210_ope.c
index a440888dcdbd..e311de41a078 100644
--- a/sound/soc/tegra/tegra210_ope.c
+++ b/sound/soc/tegra/tegra210_ope.c
@@ -329,23 +329,18 @@ static int tegra210_ope_probe(struct platform_device *pdev)
 
 	err = tegra210_peq_regmap_init(pdev);
-	if (err < 0) {
-		dev_err(dev, "PEQ init failed\n");
-		return err;
-	}
+	if (err < 0)
+		return dev_err_probe(dev, err, "PEQ init failed\n");
 
 	err = tegra210_mbdrc_regmap_init(pdev);
-	if (err < 0) {
-		dev_err(dev, "MBDRC init failed\n");
-		return err;
-	}
+	if (err < 0)
+		return dev_err_probe(dev, err, "MBDRC init failed\n");
 
 	err = devm_snd_soc_register_component(dev, &tegra210_ope_cmpnt,
 					      tegra210_ope_dais,
 					      ARRAY_SIZE(tegra210_ope_dais));
-	if (err) {
-		dev_err(dev, "can't register OPE component, err: %d\n", err);
-		return err;
-	}
+	if (err)
+		return dev_err_probe(dev, err,
+				     "can't register OPE component\n");
 
 	pm_runtime_enable(dev);
 
diff --git a/sound/soc/tegra/tegra210_peq.c b/sound/soc/tegra/tegra210_peq.c
index 2f72e9d541dc..4b692c2055bc 100644
--- a/sound/soc/tegra/tegra210_peq.c
+++ b/sound/soc/tegra/tegra210_peq.c
@@ -407,8 +407,9 @@ int tegra210_peq_regmap_init(struct platform_device *pdev)
 	int err;
 
 	child = of_get_child_by_name(dev->of_node, "equalizer");
 	if (!child)
-		return -ENODEV;
+		return dev_err_probe(dev, -ENODEV,
+				     "missing 'equalizer' DT child node\n");
 
 	err = of_address_to_resource(child, 0, &mem);
 	of_node_put(child);
@@ -424,7 +425,6 @@ int tegra210_peq_regmap_init(struct platform_device *pdev)
 	ope->peq_regmap = devm_regmap_init_mmio(dev, regs,
 						&tegra210_peq_regmap_config);
-	if (IS_ERR(ope->peq_regmap)) {
-		dev_err(dev, "regmap init failed\n");
-		return PTR_ERR(ope->peq_regmap);
-	}
+	if (IS_ERR(ope->peq_regmap))
+		return dev_err_probe(dev, PTR_ERR(ope->peq_regmap),
+				     "PEQ regmap init failed\n");
 
-- 
2.17.1


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

* [PATCH v3 10/14] ASoC: tegra: Use dev_err_probe() in tegra210_mixer probe
  2026-03-25 10:14 [PATCH v3 00/14] ASoC: tegra: Add error logging for probe and callback failures Sheetal
                   ` (8 preceding siblings ...)
  2026-03-25 10:14 ` [PATCH v3 09/14] ASoC: tegra: Use dev_err_probe() in OPE, PEQ and MBDRC drivers Sheetal
@ 2026-03-25 10:14 ` Sheetal
  2026-03-25 10:14 ` [PATCH v3 11/14] ASoC: tegra: Use dev_err_probe() in tegra210_mvc probe Sheetal
                   ` (4 subsequent siblings)
  14 siblings, 0 replies; 22+ messages in thread
From: Sheetal @ 2026-03-25 10:14 UTC (permalink / raw)
  To: Liam Girdwood, Mark Brown, Thierry Reding, Jonathan Hunter
  Cc: Jaroslav Kysela, Takashi Iwai, Mohan Kumar, Kuninori Morimoto,
	linux-sound, linux-tegra, linux-kernel, Sheetal

Log errors in the Tegra210 Mixer probe path using dev_err_probe().

Signed-off-by: Sheetal <sheetal@nvidia.com>
---
 sound/soc/tegra/tegra210_mixer.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/sound/soc/tegra/tegra210_mixer.c b/sound/soc/tegra/tegra210_mixer.c
index 6d3a2b76fd61..d9318aaaf32e 100644
--- a/sound/soc/tegra/tegra210_mixer.c
+++ b/sound/soc/tegra/tegra210_mixer.c
@@ -651,10 +651,9 @@ static int tegra210_mixer_platform_probe(struct platform_device *pdev)
 	err = devm_snd_soc_register_component(dev, &tegra210_mixer_cmpnt,
 					      tegra210_mixer_dais,
 					      ARRAY_SIZE(tegra210_mixer_dais));
-	if (err) {
-		dev_err(dev, "can't register MIXER component, err: %d\n", err);
-		return err;
-	}
+	if (err)
+		return dev_err_probe(dev, err,
+				     "can't register MIXER component\n");
 
 	pm_runtime_enable(dev);
 
-- 
2.17.1


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

* [PATCH v3 11/14] ASoC: tegra: Use dev_err_probe() in tegra210_mvc probe
  2026-03-25 10:14 [PATCH v3 00/14] ASoC: tegra: Add error logging for probe and callback failures Sheetal
                   ` (9 preceding siblings ...)
  2026-03-25 10:14 ` [PATCH v3 10/14] ASoC: tegra: Use dev_err_probe() in tegra210_mixer probe Sheetal
@ 2026-03-25 10:14 ` Sheetal
  2026-03-25 10:14 ` [PATCH v3 12/14] ASoC: tegra: Use dev_err_probe() in tegra210_sfc probe Sheetal
                   ` (3 subsequent siblings)
  14 siblings, 0 replies; 22+ messages in thread
From: Sheetal @ 2026-03-25 10:14 UTC (permalink / raw)
  To: Liam Girdwood, Mark Brown, Thierry Reding, Jonathan Hunter
  Cc: Jaroslav Kysela, Takashi Iwai, Mohan Kumar, Kuninori Morimoto,
	linux-sound, linux-tegra, linux-kernel, Sheetal

Log errors in the Tegra210 MVC probe path using dev_err_probe().

Signed-off-by: Sheetal <sheetal@nvidia.com>
---
 sound/soc/tegra/tegra210_mvc.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/sound/soc/tegra/tegra210_mvc.c b/sound/soc/tegra/tegra210_mvc.c
index 6cdc5e1f5507..11bd0ea22797 100644
--- a/sound/soc/tegra/tegra210_mvc.c
+++ b/sound/soc/tegra/tegra210_mvc.c
@@ -741,10 +741,9 @@ static int tegra210_mvc_platform_probe(struct platform_device *pdev)
 	err = devm_snd_soc_register_component(dev, &tegra210_mvc_cmpnt,
 					      tegra210_mvc_dais,
 					      ARRAY_SIZE(tegra210_mvc_dais));
-	if (err) {
-		dev_err(dev, "can't register MVC component, err: %d\n", err);
-		return err;
-	}
+	if (err)
+		return dev_err_probe(dev, err,
+				     "can't register MVC component\n");
 
 	pm_runtime_enable(dev);
 
-- 
2.17.1


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

* [PATCH v3 12/14] ASoC: tegra: Use dev_err_probe() in tegra210_sfc probe
  2026-03-25 10:14 [PATCH v3 00/14] ASoC: tegra: Add error logging for probe and callback failures Sheetal
                   ` (10 preceding siblings ...)
  2026-03-25 10:14 ` [PATCH v3 11/14] ASoC: tegra: Use dev_err_probe() in tegra210_mvc probe Sheetal
@ 2026-03-25 10:14 ` Sheetal
  2026-03-25 13:11   ` Mark Brown
  2026-03-25 10:14 ` [PATCH v3 13/14] ASoC: tegra: Use dev_err_probe() in tegra_asoc_machine probe Sheetal
                   ` (2 subsequent siblings)
  14 siblings, 1 reply; 22+ messages in thread
From: Sheetal @ 2026-03-25 10:14 UTC (permalink / raw)
  To: Liam Girdwood, Mark Brown, Thierry Reding, Jonathan Hunter
  Cc: Jaroslav Kysela, Takashi Iwai, Mohan Kumar, Kuninori Morimoto,
	linux-sound, linux-tegra, linux-kernel, Sheetal

Log errors in the Tegra210 SFC probe path using dev_err_probe().

Signed-off-by: Sheetal <sheetal@nvidia.com>
---
 sound/soc/tegra/tegra210_sfc.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/sound/soc/tegra/tegra210_sfc.c b/sound/soc/tegra/tegra210_sfc.c
index b298bf0421b1..0f342fae058f 100644
--- a/sound/soc/tegra/tegra210_sfc.c
+++ b/sound/soc/tegra/tegra210_sfc.c
@@ -3608,10 +3608,9 @@ static int tegra210_sfc_platform_probe(struct platform_device *pdev)
 	err = devm_snd_soc_register_component(dev, &tegra210_sfc_cmpnt,
 					      tegra210_sfc_dais,
 					      ARRAY_SIZE(tegra210_sfc_dais));
-	if (err) {
-		dev_err(dev, "can't register SFC component, err: %d\n", err);
-		return err;
-	}
+	if (err)
+		return dev_err_probe(dev, err,
+				     "can't register SFC component\n");
 
 	pm_runtime_enable(&pdev->dev);
 
-- 
2.17.1


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

* [PATCH v3 13/14] ASoC: tegra: Use dev_err_probe() in tegra_asoc_machine probe
  2026-03-25 10:14 [PATCH v3 00/14] ASoC: tegra: Add error logging for probe and callback failures Sheetal
                   ` (11 preceding siblings ...)
  2026-03-25 10:14 ` [PATCH v3 12/14] ASoC: tegra: Use dev_err_probe() in tegra210_sfc probe Sheetal
@ 2026-03-25 10:14 ` Sheetal
  2026-03-25 10:14 ` [PATCH v3 14/14] ASoC: tegra: Use dev_err_probe() in tegra_audio_graph_card probe Sheetal
  2026-03-25 13:18 ` (subset) [PATCH v3 00/14] ASoC: tegra: Add error logging for probe and callback failures Mark Brown
  14 siblings, 0 replies; 22+ messages in thread
From: Sheetal @ 2026-03-25 10:14 UTC (permalink / raw)
  To: Liam Girdwood, Mark Brown, Thierry Reding, Jonathan Hunter
  Cc: Jaroslav Kysela, Takashi Iwai, Mohan Kumar, Kuninori Morimoto,
	linux-sound, linux-tegra, linux-kernel, Sheetal

Log errors in the Tegra ASoC machine driver probe path using
dev_err_probe().

Signed-off-by: Sheetal <sheetal@nvidia.com>
---
 sound/soc/tegra/tegra_asoc_machine.c | 70 +++++++++++++++++-----------------
 1 file changed, 35 insertions(+), 35 deletions(-)

diff --git a/sound/soc/tegra/tegra_asoc_machine.c b/sound/soc/tegra/tegra_asoc_machine.c
index 10834f9c3422..d7245a10bba1 100644
--- a/sound/soc/tegra/tegra_asoc_machine.c
+++ b/sound/soc/tegra/tegra_asoc_machine.c
@@ -431,8 +431,9 @@ static int tegra_machine_register_codec(struct device *dev, const char *name)
 		return 0;
 
 	pdev = platform_device_register_simple(name, -1, NULL, 0);
 	if (IS_ERR(pdev))
-		return PTR_ERR(pdev);
+		return dev_err_probe(dev, PTR_ERR(pdev),
+				     "failed to register codec %s\n", name);
 
 	err = devm_add_action_or_reset(dev, tegra_machine_unregister_codec,
 				       pdev);
@@ -468,32 +469,38 @@ int tegra_asoc_machine_probe(struct platform_device *pdev)
 	gpiod = devm_gpiod_get_optional(dev, "nvidia,hp-mute", GPIOD_OUT_HIGH);
 	machine->gpiod_hp_mute = gpiod;
 	if (IS_ERR(gpiod))
-		return PTR_ERR(gpiod);
+		return dev_err_probe(dev, PTR_ERR(gpiod),
+				     "failed to get hp-mute GPIO\n");
 
 	gpiod = devm_gpiod_get_optional(dev, "nvidia,hp-det", GPIOD_IN);
 	machine->gpiod_hp_det = gpiod;
 	if (IS_ERR(gpiod))
-		return PTR_ERR(gpiod);
+		return dev_err_probe(dev, PTR_ERR(gpiod),
+				     "failed to get hp-det GPIO\n");
 
 	gpiod = devm_gpiod_get_optional(dev, "nvidia,mic-det", GPIOD_IN);
 	machine->gpiod_mic_det = gpiod;
 	if (IS_ERR(gpiod))
-		return PTR_ERR(gpiod);
+		return dev_err_probe(dev, PTR_ERR(gpiod),
+				     "failed to get mic-det GPIO\n");
 
 	gpiod = devm_gpiod_get_optional(dev, "nvidia,spkr-en", GPIOD_OUT_LOW);
 	machine->gpiod_spkr_en = gpiod;
 	if (IS_ERR(gpiod))
-		return PTR_ERR(gpiod);
+		return dev_err_probe(dev, PTR_ERR(gpiod),
+				     "failed to get spkr-en GPIO\n");
 
 	gpiod = devm_gpiod_get_optional(dev, "nvidia,int-mic-en", GPIOD_OUT_LOW);
 	machine->gpiod_int_mic_en = gpiod;
 	if (IS_ERR(gpiod))
-		return PTR_ERR(gpiod);
+		return dev_err_probe(dev, PTR_ERR(gpiod),
+				     "failed to get int-mic-en GPIO\n");
 
 	gpiod = devm_gpiod_get_optional(dev, "nvidia,ext-mic-en", GPIOD_OUT_LOW);
 	machine->gpiod_ext_mic_en = gpiod;
 	if (IS_ERR(gpiod))
-		return PTR_ERR(gpiod);
+		return dev_err_probe(dev, PTR_ERR(gpiod),
+				     "failed to get ext-mic-en GPIO\n");
 
 	err = snd_soc_of_parse_card_name(card, "nvidia,model");
 	if (err)
@@ -549,22 +556,19 @@ int tegra_asoc_machine_probe(struct platform_device *pdev)
 		card->driver_name = "tegra";
 
 	machine->clk_pll_a = devm_clk_get(dev, "pll_a");
-	if (IS_ERR(machine->clk_pll_a)) {
-		dev_err(dev, "Can't retrieve clk pll_a\n");
-		return PTR_ERR(machine->clk_pll_a);
-	}
+	if (IS_ERR(machine->clk_pll_a))
+		return dev_err_probe(dev, PTR_ERR(machine->clk_pll_a),
+				     "can't retrieve clk pll_a\n");
 
 	machine->clk_pll_a_out0 = devm_clk_get(dev, "pll_a_out0");
-	if (IS_ERR(machine->clk_pll_a_out0)) {
-		dev_err(dev, "Can't retrieve clk pll_a_out0\n");
-		return PTR_ERR(machine->clk_pll_a_out0);
-	}
+	if (IS_ERR(machine->clk_pll_a_out0))
+		return dev_err_probe(dev, PTR_ERR(machine->clk_pll_a_out0),
+				     "can't retrieve clk pll_a_out0\n");
 
 	machine->clk_cdev1 = devm_clk_get(dev, "mclk");
-	if (IS_ERR(machine->clk_cdev1)) {
-		dev_err(dev, "Can't retrieve clk cdev1\n");
-		return PTR_ERR(machine->clk_cdev1);
-	}
+	if (IS_ERR(machine->clk_cdev1))
+		return dev_err_probe(dev, PTR_ERR(machine->clk_cdev1),
+				     "can't retrieve clk cdev1\n");
 
 	/*
 	 * If clock parents are not set in DT, configure here to use clk_out_1
@@ -578,26 +582,22 @@ int tegra_asoc_machine_probe(struct platform_device *pdev)
 		dev_warn(dev, "Please update DT to use assigned-clock-parents\n");
 
 		clk_extern1 = devm_clk_get(dev, "extern1");
-		if (IS_ERR(clk_extern1)) {
-			dev_err(dev, "Can't retrieve clk extern1\n");
-			return PTR_ERR(clk_extern1);
-		}
+		if (IS_ERR(clk_extern1))
+			return dev_err_probe(dev, PTR_ERR(clk_extern1),
+					     "can't retrieve clk extern1\n");
 
 		err = clk_set_parent(clk_extern1, machine->clk_pll_a_out0);
-		if (err < 0) {
-			dev_err(dev, "Set parent failed for clk extern1\n");
-			return err;
-		}
+		if (err < 0)
+			return dev_err_probe(dev, err,
+					     "set parent failed for clk extern1\n");
 
 		clk_out_1 = devm_clk_get(dev, "pmc_clk_out_1");
-		if (IS_ERR(clk_out_1)) {
-			dev_err(dev, "Can't retrieve pmc_clk_out_1\n");
-			return PTR_ERR(clk_out_1);
-		}
+		if (IS_ERR(clk_out_1))
+			return dev_err_probe(dev, PTR_ERR(clk_out_1),
+					     "can't retrieve pmc_clk_out_1\n");
 
 		err = clk_set_parent(clk_out_1, clk_extern1);
-		if (err < 0) {
-			dev_err(dev, "Set parent failed for pmc_clk_out_1\n");
-			return err;
-		}
+		if (err < 0)
+			return dev_err_probe(dev, err,
+					     "set parent failed for pmc_clk_out_1\n");
 
-- 
2.17.1


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

* [PATCH v3 14/14] ASoC: tegra: Use dev_err_probe() in tegra_audio_graph_card probe
  2026-03-25 10:14 [PATCH v3 00/14] ASoC: tegra: Add error logging for probe and callback failures Sheetal
                   ` (12 preceding siblings ...)
  2026-03-25 10:14 ` [PATCH v3 13/14] ASoC: tegra: Use dev_err_probe() in tegra_asoc_machine probe Sheetal
@ 2026-03-25 10:14 ` Sheetal
  2026-03-25 13:18 ` (subset) [PATCH v3 00/14] ASoC: tegra: Add error logging for probe and callback failures Mark Brown
  14 siblings, 0 replies; 22+ messages in thread
From: Sheetal @ 2026-03-25 10:14 UTC (permalink / raw)
  To: Liam Girdwood, Mark Brown, Thierry Reding, Jonathan Hunter
  Cc: Jaroslav Kysela, Takashi Iwai, Mohan Kumar, Kuninori Morimoto,
	linux-sound, linux-tegra, linux-kernel, Sheetal

Log errors in the Tegra audio graph card probe path using
dev_err_probe().

Signed-off-by: Sheetal <sheetal@nvidia.com>
---
 sound/soc/tegra/tegra_audio_graph_card.c | 21 ++++++++++++---------
 1 file changed, 12 insertions(+), 9 deletions(-)

diff --git a/sound/soc/tegra/tegra_audio_graph_card.c b/sound/soc/tegra/tegra_audio_graph_card.c
index ea10e6e8a9fe..b93a61db9ed0 100644
--- a/sound/soc/tegra/tegra_audio_graph_card.c
+++ b/sound/soc/tegra/tegra_audio_graph_card.c
@@ -174,20 +174,23 @@ static int tegra_audio_graph_card_probe(struct snd_soc_card *card)
 {
 	struct simple_util_priv *simple = snd_soc_card_get_drvdata(card);
 	struct tegra_audio_priv *priv = simple_to_tegra_priv(simple);
+	int ret;
 
 	priv->clk_plla = devm_clk_get(card->dev, "pll_a");
-	if (IS_ERR(priv->clk_plla)) {
-		dev_err(card->dev, "Can't retrieve clk pll_a\n");
-		return PTR_ERR(priv->clk_plla);
-	}
+	if (IS_ERR(priv->clk_plla))
+		return dev_err_probe(card->dev, PTR_ERR(priv->clk_plla),
+				     "can't retrieve clk pll_a\n");
 
 	priv->clk_plla_out0 = devm_clk_get(card->dev, "plla_out0");
-	if (IS_ERR(priv->clk_plla_out0)) {
-		dev_err(card->dev, "Can't retrieve clk plla_out0\n");
-		return PTR_ERR(priv->clk_plla_out0);
-	}
+	if (IS_ERR(priv->clk_plla_out0))
+		return dev_err_probe(card->dev, PTR_ERR(priv->clk_plla_out0),
+				     "can't retrieve clk plla_out0\n");
+
+	ret = graph_util_card_probe(card);
+	if (ret < 0)
+		return dev_err_probe(card->dev, ret, "graph_util_card_probe failed\n");
 
-	return graph_util_card_probe(card);
+	return ret;
 }
 
 static int tegra_audio_graph_probe(struct platform_device *pdev)
-- 
2.17.1


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

* Re: [PATCH v3 01/14] ASoC: tegra: Use dev_err_probe() in tegra186_asrc probe
  2026-03-25 10:14 ` [PATCH v3 01/14] ASoC: tegra: Use dev_err_probe() in tegra186_asrc probe Sheetal
@ 2026-03-25 13:03   ` Mark Brown
  0 siblings, 0 replies; 22+ messages in thread
From: Mark Brown @ 2026-03-25 13:03 UTC (permalink / raw)
  To: Sheetal
  Cc: Liam Girdwood, Thierry Reding, Jonathan Hunter, Jaroslav Kysela,
	Takashi Iwai, Mohan Kumar, Kuninori Morimoto, linux-sound,
	linux-tegra, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 250 bytes --]

On Wed, Mar 25, 2026 at 10:14:24AM +0000, Sheetal wrote:
> Log errors in the Tegra186 ASRC probe path using dev_err_probe().
> 

There's still dev_err() logging on regmap init failures here (I'll take
this patch, please send a separate patch).

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* Re: [PATCH v3 03/14] ASoC: tegra: Add error logging in tegra210_admaif driver
  2026-03-25 10:14 ` [PATCH v3 03/14] ASoC: tegra: Add error logging in tegra210_admaif driver Sheetal
@ 2026-03-25 13:05   ` Mark Brown
  0 siblings, 0 replies; 22+ messages in thread
From: Mark Brown @ 2026-03-25 13:05 UTC (permalink / raw)
  To: Sheetal
  Cc: Liam Girdwood, Thierry Reding, Jonathan Hunter, Jaroslav Kysela,
	Takashi Iwai, Mohan Kumar, Kuninori Morimoto, linux-sound,
	linux-tegra, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 590 bytes --]

On Wed, Mar 25, 2026 at 10:14:26AM +0000, Sheetal wrote:

> Log errors in the Tegra210 ADMAIF probe and runtime callback paths.

> @@ -966,10 +969,9 @@ static int tegra_admaif_probe(struct platform_device *pdev)
>  	regcache_cache_only(admaif->regmap, true);
>  
>  	err = tegra_isomgr_adma_register(&pdev->dev);
> -	if (err) {
> -		dev_err(&pdev->dev, "Failed to add interconnect path\n");
> -		return err;
> -	}
> +	if (err)
> +		return dev_err_probe(&pdev->dev, err,
> +				     "failed to add interconnect path\n");

tegra_isomgr_adma_register() already logs failures.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* Re: [PATCH v3 05/14] ASoC: tegra: Use dev_err_probe() in tegra210_ahub probe
  2026-03-25 10:14 ` [PATCH v3 05/14] ASoC: tegra: Use dev_err_probe() in tegra210_ahub probe Sheetal
@ 2026-03-25 13:07   ` Mark Brown
  0 siblings, 0 replies; 22+ messages in thread
From: Mark Brown @ 2026-03-25 13:07 UTC (permalink / raw)
  To: Sheetal
  Cc: Liam Girdwood, Thierry Reding, Jonathan Hunter, Jaroslav Kysela,
	Takashi Iwai, Mohan Kumar, Kuninori Morimoto, linux-sound,
	linux-tegra, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 208 bytes --]

On Wed, Mar 25, 2026 at 10:14:28AM +0000, Sheetal wrote:
> Log errors in the Tegra210 AHUB probe path using dev_err_probe().

We also have some regmap logging in this file (again, can be done
incrementally).

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* Re: [PATCH v3 07/14] ASoC: tegra: Use dev_err_probe() in tegra210_dmic probe
  2026-03-25 10:14 ` [PATCH v3 07/14] ASoC: tegra: Use dev_err_probe() in tegra210_dmic probe Sheetal
@ 2026-03-25 13:08   ` Mark Brown
  0 siblings, 0 replies; 22+ messages in thread
From: Mark Brown @ 2026-03-25 13:08 UTC (permalink / raw)
  To: Sheetal
  Cc: Liam Girdwood, Thierry Reding, Jonathan Hunter, Jaroslav Kysela,
	Takashi Iwai, Mohan Kumar, Kuninori Morimoto, linux-sound,
	linux-tegra, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 157 bytes --]

On Wed, Mar 25, 2026 at 10:14:30AM +0000, Sheetal wrote:
> Log errors in the Tegra210 DMIC probe path using dev_err_probe().

Another one with a regmap log.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* Re: [PATCH v3 09/14] ASoC: tegra: Use dev_err_probe() in OPE, PEQ and MBDRC drivers
  2026-03-25 10:14 ` [PATCH v3 09/14] ASoC: tegra: Use dev_err_probe() in OPE, PEQ and MBDRC drivers Sheetal
@ 2026-03-25 13:10   ` Mark Brown
  0 siblings, 0 replies; 22+ messages in thread
From: Mark Brown @ 2026-03-25 13:10 UTC (permalink / raw)
  To: Sheetal
  Cc: Liam Girdwood, Thierry Reding, Jonathan Hunter, Jaroslav Kysela,
	Takashi Iwai, Mohan Kumar, Kuninori Morimoto, linux-sound,
	linux-tegra, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 472 bytes --]

On Wed, Mar 25, 2026 at 10:14:32AM +0000, Sheetal wrote:
> Log errors in the Tegra210 OPE, PEQ and MBDRC probe paths using
> dev_err_probe().

>  	err = tegra210_peq_regmap_init(pdev);
> -	if (err < 0) {
> -		dev_err(dev, "PEQ init failed\n");
> -		return err;
> -	}
> +	if (err < 0)
> +		return dev_err_probe(dev, err, "PEQ init failed\n");

There's dev_err_probe() logging in the called function, the
dev_err_probe() here is redundant and overwrites the failure reason.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* Re: [PATCH v3 12/14] ASoC: tegra: Use dev_err_probe() in tegra210_sfc probe
  2026-03-25 10:14 ` [PATCH v3 12/14] ASoC: tegra: Use dev_err_probe() in tegra210_sfc probe Sheetal
@ 2026-03-25 13:11   ` Mark Brown
  0 siblings, 0 replies; 22+ messages in thread
From: Mark Brown @ 2026-03-25 13:11 UTC (permalink / raw)
  To: Sheetal
  Cc: Liam Girdwood, Thierry Reding, Jonathan Hunter, Jaroslav Kysela,
	Takashi Iwai, Mohan Kumar, Kuninori Morimoto, linux-sound,
	linux-tegra, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 176 bytes --]

On Wed, Mar 25, 2026 at 10:14:35AM +0000, Sheetal wrote:
> Log errors in the Tegra210 SFC probe path using dev_err_probe().

Another one with a regmap error log not converted.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* Re: (subset) [PATCH v3 00/14] ASoC: tegra: Add error logging for probe and callback failures
  2026-03-25 10:14 [PATCH v3 00/14] ASoC: tegra: Add error logging for probe and callback failures Sheetal
                   ` (13 preceding siblings ...)
  2026-03-25 10:14 ` [PATCH v3 14/14] ASoC: tegra: Use dev_err_probe() in tegra_audio_graph_card probe Sheetal
@ 2026-03-25 13:18 ` Mark Brown
  14 siblings, 0 replies; 22+ messages in thread
From: Mark Brown @ 2026-03-25 13:18 UTC (permalink / raw)
  To: Liam Girdwood, Thierry Reding, Jonathan Hunter, Sheetal
  Cc: Jaroslav Kysela, Takashi Iwai, Mohan Kumar, Kuninori Morimoto,
	linux-sound, linux-tegra, linux-kernel

On Wed, 25 Mar 2026 10:14:23 +0000, Sheetal wrote:
> ASoC: tegra: Add error logging for probe and callback failures
> 
> Log errors in probe and runtime error paths across Tegra audio drivers.
> Use dev_err_probe() in probe paths and dev_err() in runtime callbacks.
> Skip redundant logging where the underlying API already reports errors.
> 
> Changes in v3:
> - Split single patch into per-driver patch series for easier review
>   and incremental merging.
> - Drop dev_err() from tegra_ahub_put_value_enum() since the error path
>   is userspace-triggerable and would allow log spamming.
> - Drop dev_err() from tegra210_mixer_set_audio_cif() since the driver
>   advertises S8 format support but this function doesn't handle it,
>   creating a userspace-triggerable log spam path.
> 
> [...]

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-7.1

Thanks!

[01/14] ASoC: tegra: Use dev_err_probe() in tegra186_asrc probe
        https://git.kernel.org/broonie/sound/c/884f3101d1ed
[02/14] ASoC: tegra: Use dev_err_probe() in tegra186_dspk probe
        https://git.kernel.org/broonie/sound/c/6205ca05227f
[04/14] ASoC: tegra: Add error logging in tegra210_adx driver
        https://git.kernel.org/broonie/sound/c/50e51b84a4b3
[05/14] ASoC: tegra: Use dev_err_probe() in tegra210_ahub probe
        https://git.kernel.org/broonie/sound/c/802d0d6c25b3
[06/14] ASoC: tegra: Add error logging in tegra210_amx driver
        https://git.kernel.org/broonie/sound/c/d310c08db2d8
[07/14] ASoC: tegra: Use dev_err_probe() in tegra210_dmic probe
        https://git.kernel.org/broonie/sound/c/ca069c3403ec
[08/14] ASoC: tegra: Add error logging in tegra210_i2s driver
        https://git.kernel.org/broonie/sound/c/67b7bcdd9798
[10/14] ASoC: tegra: Use dev_err_probe() in tegra210_mixer probe
        https://git.kernel.org/broonie/sound/c/3d027d4b93b9
[11/14] ASoC: tegra: Use dev_err_probe() in tegra210_mvc probe
        https://git.kernel.org/broonie/sound/c/f2067c1dba07
[12/14] ASoC: tegra: Use dev_err_probe() in tegra210_sfc probe
        https://git.kernel.org/broonie/sound/c/856ffd8f4aae
[13/14] ASoC: tegra: Use dev_err_probe() in tegra_asoc_machine probe
        https://git.kernel.org/broonie/sound/c/fa11e1cb2b77
[14/14] ASoC: tegra: Use dev_err_probe() in tegra_audio_graph_card probe
        https://git.kernel.org/broonie/sound/c/f7d9eb0291ef

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] 22+ messages in thread

end of thread, other threads:[~2026-03-25 18:31 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-25 10:14 [PATCH v3 00/14] ASoC: tegra: Add error logging for probe and callback failures Sheetal
2026-03-25 10:14 ` [PATCH v3 01/14] ASoC: tegra: Use dev_err_probe() in tegra186_asrc probe Sheetal
2026-03-25 13:03   ` Mark Brown
2026-03-25 10:14 ` [PATCH v3 02/14] ASoC: tegra: Use dev_err_probe() in tegra186_dspk probe Sheetal
2026-03-25 10:14 ` [PATCH v3 03/14] ASoC: tegra: Add error logging in tegra210_admaif driver Sheetal
2026-03-25 13:05   ` Mark Brown
2026-03-25 10:14 ` [PATCH v3 04/14] ASoC: tegra: Add error logging in tegra210_adx driver Sheetal
2026-03-25 10:14 ` [PATCH v3 05/14] ASoC: tegra: Use dev_err_probe() in tegra210_ahub probe Sheetal
2026-03-25 13:07   ` Mark Brown
2026-03-25 10:14 ` [PATCH v3 06/14] ASoC: tegra: Add error logging in tegra210_amx driver Sheetal
2026-03-25 10:14 ` [PATCH v3 07/14] ASoC: tegra: Use dev_err_probe() in tegra210_dmic probe Sheetal
2026-03-25 13:08   ` Mark Brown
2026-03-25 10:14 ` [PATCH v3 08/14] ASoC: tegra: Add error logging in tegra210_i2s driver Sheetal
2026-03-25 10:14 ` [PATCH v3 09/14] ASoC: tegra: Use dev_err_probe() in OPE, PEQ and MBDRC drivers Sheetal
2026-03-25 13:10   ` Mark Brown
2026-03-25 10:14 ` [PATCH v3 10/14] ASoC: tegra: Use dev_err_probe() in tegra210_mixer probe Sheetal
2026-03-25 10:14 ` [PATCH v3 11/14] ASoC: tegra: Use dev_err_probe() in tegra210_mvc probe Sheetal
2026-03-25 10:14 ` [PATCH v3 12/14] ASoC: tegra: Use dev_err_probe() in tegra210_sfc probe Sheetal
2026-03-25 13:11   ` Mark Brown
2026-03-25 10:14 ` [PATCH v3 13/14] ASoC: tegra: Use dev_err_probe() in tegra_asoc_machine probe Sheetal
2026-03-25 10:14 ` [PATCH v3 14/14] ASoC: tegra: Use dev_err_probe() in tegra_audio_graph_card probe Sheetal
2026-03-25 13:18 ` (subset) [PATCH v3 00/14] ASoC: tegra: Add error logging for probe and callback failures Mark Brown

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