Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

authored by

Sheetal and committed by
Mark Brown
50e51b84 6205ca05

+8 -5
+8 -5
sound/soc/tegra/tegra210_adx.c
··· 134 134 135 135 memset(&cif_conf, 0, sizeof(struct tegra_cif_conf)); 136 136 137 - if (channels < 1 || channels > adx->soc_data->max_ch) 137 + if (channels < 1 || channels > adx->soc_data->max_ch) { 138 + dev_err(dai->dev, "invalid channels: %u (max %u)\n", 139 + channels, adx->soc_data->max_ch); 138 140 return -EINVAL; 141 + } 139 142 140 143 switch (format) { 141 144 case SNDRV_PCM_FORMAT_S8: ··· 152 149 audio_bits = TEGRA_ACIF_BITS_32; 153 150 break; 154 151 default: 152 + dev_err(dai->dev, "unsupported format: %d\n", format); 155 153 return -EINVAL; 156 154 } 157 155 ··· 721 717 err = devm_snd_soc_register_component(dev, &tegra210_adx_cmpnt, 722 718 tegra210_adx_dais, 723 719 ARRAY_SIZE(tegra210_adx_dais)); 724 - if (err) { 725 - dev_err(dev, "can't register ADX component, err: %d\n", err); 726 - return err; 727 - } 720 + if (err) 721 + return dev_err_probe(dev, err, 722 + "can't register ADX component\n"); 728 723 729 724 pm_runtime_enable(dev); 730 725