diff options
| author | Sheetal <sheetal@nvidia.com> | 2026-03-25 13:14:27 +0300 |
|---|---|---|
| committer | Mark Brown <broonie@kernel.org> | 2026-03-25 16:14:20 +0300 |
| commit | 50e51b84a4b38f2dbffe48e16aef5e0568cc14e9 (patch) | |
| tree | 309383e658a13f22089ff96d1cefe0153e0b41a5 | |
| parent | 6205ca05227f26721b8d5920d976ecae6f8ce83e (diff) | |
| download | linux-50e51b84a4b38f2dbffe48e16aef5e0568cc14e9.tar.xz | |
ASoC: tegra: Add error logging in tegra210_adx driver
Log errors in the Tegra210 ADX probe and set_audio_cif paths.
Signed-off-by: Sheetal <sheetal@nvidia.com>
Link: https://patch.msgid.link/20260325101437.3059693-5-sheetal@nvidia.com
Signed-off-by: Mark Brown <broonie@kernel.org>
| -rw-r--r-- | sound/soc/tegra/tegra210_adx.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/sound/soc/tegra/tegra210_adx.c b/sound/soc/tegra/tegra210_adx.c index 95875c75ddf8..6a5f93f76984 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); |
