summaryrefslogtreecommitdiff
path: root/sound/soc/tegra
diff options
context:
space:
mode:
authorbui duc phuc <phucduc.bui@gmail.com>2026-07-15 12:11:14 +0700
committerMark Brown <broonie@kernel.org>2026-07-15 13:48:23 +0100
commitf7cbc51424cd22098b0e6c09cbe338d7cd6137a7 (patch)
treeffaf27b589a024f09028061a08e5ae97981f8e25 /sound/soc/tegra
parentb82384bffb27467e2e3966831d83eff3a6e1fbbb (diff)
downloadlinux-next-f7cbc51424cd22098b0e6c09cbe338d7cd6137a7.tar.gz
linux-next-f7cbc51424cd22098b0e6c09cbe338d7cd6137a7.zip
ASoC: tegra: tegra210_amx: Return the original error directly
snd_soc_add_component_controls() already reports failures internally. Return its error code directly instead of logging the error again in the component probe callback. Also remove the now unnecessary local error variable. Signed-off-by: bui duc phuc <phucduc.bui@gmail.com> Reviewed-by: Thierry Reding <treding@nvidia.com> Link: https://patch.msgid.link/20260715051115.17385-4-phucduc.bui@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/tegra')
-rw-r--r--sound/soc/tegra/tegra210_amx.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/sound/soc/tegra/tegra210_amx.c b/sound/soc/tegra/tegra210_amx.c
index cc1f9c158191..6a67ce6128b4 100644
--- a/sound/soc/tegra/tegra210_amx.c
+++ b/sound/soc/tegra/tegra210_amx.c
@@ -504,16 +504,12 @@ static struct snd_kcontrol_new tegra264_amx_controls[] = {
static int tegra210_amx_component_probe(struct snd_soc_component *component)
{
struct tegra210_amx *amx = snd_soc_component_get_drvdata(component);
- int err = 0;
- if (amx->soc_data->num_controls) {
- err = snd_soc_add_component_controls(component, amx->soc_data->controls,
- amx->soc_data->num_controls);
- if (err)
- dev_err(component->dev, "can't add AMX controls, err: %d\n", err);
- }
+ if (amx->soc_data->num_controls)
+ return snd_soc_add_component_controls(component, amx->soc_data->controls,
+ amx->soc_data->num_controls);
- return err;
+ return 0;
}
static const struct snd_soc_component_driver tegra210_amx_cmpnt = {