From: Sheetal <sheetal@nvidia.com>
To: Liam Girdwood <lgirdwood@gmail.com>,
Mark Brown <broonie@kernel.org>,
Thierry Reding <thierry.reding@kernel.org>,
Jonathan Hunter <jonathanh@nvidia.com>
Cc: Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>,
"Mohan Kumar" <mkumard@nvidia.com>,
Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>,
<linux-sound@vger.kernel.org>, <linux-tegra@vger.kernel.org>,
<linux-kernel@vger.kernel.org>, Sheetal <sheetal@nvidia.com>
Subject: [PATCH v4 1/4] ASoC: tegra: Add error logging in tegra210_admaif driver
Date: Wed, 1 Apr 2026 11:24:57 +0000 [thread overview]
Message-ID: <20260401112500.4076861-2-sheetal@nvidia.com> (raw)
In-Reply-To: <20260401112500.4076861-1-sheetal@nvidia.com>
Log errors in the Tegra210 ADMAIF probe and runtime callback paths.
Drop redundant dev_err() at tegra_isomgr_adma_register() call site
since it already logs errors internally.
Signed-off-by: Sheetal <sheetal@nvidia.com>
---
sound/soc/tegra/tegra210_admaif.c | 24 +++++++++++-------------
1 file changed, 11 insertions(+), 13 deletions(-)
diff --git a/sound/soc/tegra/tegra210_admaif.c b/sound/soc/tegra/tegra210_admaif.c
index 0976779d29f2..a1b2c3d4e5f6 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;
}
}
@@ -958,10 +961,9 @@ static int tegra_admaif_probe(struct platform_device *pdev)
admaif->regmap = devm_regmap_init_mmio(&pdev->dev, regs,
admaif->soc_data->regmap_conf);
- if (IS_ERR(admaif->regmap)) {
- dev_err(&pdev->dev, "regmap init failed\n");
- return PTR_ERR(admaif->regmap);
- }
+ if (IS_ERR(admaif->regmap))
+ return dev_err_probe(&pdev->dev, PTR_ERR(admaif->regmap),
+ "regmap init failed\n");
regcache_cache_only(admaif->regmap, true);
@@ -968,7 +970,5 @@ static int tegra_admaif_probe(struct platform_device *pdev)
err = tegra_isomgr_adma_register(&pdev->dev);
- if (err) {
- dev_err(&pdev->dev, "Failed to add interconnect path\n");
- return err;
- }
+ if (err)
+ return err;
regmap_update_bits(admaif->regmap, admaif->soc_data->global_base +
@@ -1009,11 +1009,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
next prev parent reply other threads:[~2026-04-01 11:25 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-01 11:24 [PATCH v4 0/4] ASoC: tegra: Add error logging for probe and callback failures Sheetal
2026-04-01 11:24 ` Sheetal [this message]
2026-04-01 11:24 ` [PATCH v4 2/4] ASoC: tegra: Use dev_err_probe() in OPE, PEQ and MBDRC drivers Sheetal
2026-04-01 11:24 ` [PATCH v4 3/4] ASoC: tegra: Use dev_err_probe() for regmap init failures Sheetal
2026-04-01 11:25 ` [PATCH v4 4/4] ASoC: tegra: Use dev_err_probe() in tegra_asoc_machine probe Sheetal
2026-04-01 13:53 ` [PATCH v4 0/4] ASoC: tegra: Add error logging for probe and callback failures Mark Brown
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260401112500.4076861-2-sheetal@nvidia.com \
--to=sheetal@nvidia.com \
--cc=broonie@kernel.org \
--cc=jonathanh@nvidia.com \
--cc=kuninori.morimoto.gx@renesas.com \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=linux-tegra@vger.kernel.org \
--cc=mkumard@nvidia.com \
--cc=perex@perex.cz \
--cc=thierry.reding@kernel.org \
--cc=tiwai@suse.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox