From: phucduc.bui@gmail.com
To: Mark Brown <broonie@kernel.org>,
Thierry Reding <thierry.reding@kernel.org>,
Liam Girdwood <lgirdwood@gmail.com>,
Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>,
Jonathan Hunter <jonathanh@nvidia.com>
Cc: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>,
Sheetal <sheetal@nvidia.com>,
u.kleine-koenig@baylibre.com,
Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>,
Rosen Penev <rosenp@gmail.com>,
Piyush Patle <piyushpatle228@gmail.com>,
Takashi Sakamoto <o-takashi@sakamocchi.jp>,
Bjorn Helgaas <bhelgaas@google.com>,
linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-sound@vger.kernel.org, bui duc phuc <phucduc.bui@gmail.com>
Subject: [PATCH 2/4] ASoC: tegra: tegra210_adx: Return the original error directly
Date: Wed, 15 Jul 2026 12:11:13 +0700 [thread overview]
Message-ID: <20260715051115.17385-3-phucduc.bui@gmail.com> (raw)
In-Reply-To: <20260715051115.17385-1-phucduc.bui@gmail.com>
From: bui duc phuc <phucduc.bui@gmail.com>
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>
---
sound/soc/tegra/tegra210_adx.c | 12 ++++--------
1 file changed, 4 insertions(+), 8 deletions(-)
diff --git a/sound/soc/tegra/tegra210_adx.c b/sound/soc/tegra/tegra210_adx.c
index 15a94196ee1a..e75bf50f8fb0 100644
--- a/sound/soc/tegra/tegra210_adx.c
+++ b/sound/soc/tegra/tegra210_adx.c
@@ -496,16 +496,12 @@ static struct snd_kcontrol_new tegra264_adx_controls[] = {
static int tegra210_adx_component_probe(struct snd_soc_component *component)
{
struct tegra210_adx *adx = snd_soc_component_get_drvdata(component);
- int err = 0;
- if (adx->soc_data->num_controls) {
- err = snd_soc_add_component_controls(component, adx->soc_data->controls,
- adx->soc_data->num_controls);
- if (err)
- dev_err(component->dev, "can't add ADX controls, err: %d\n", err);
- }
+ if (adx->soc_data->num_controls)
+ return snd_soc_add_component_controls(component, adx->soc_data->controls,
+ adx->soc_data->num_controls);
- return err;
+ return 0;
}
static const struct snd_soc_component_driver tegra210_adx_cmpnt = {
--
2.43.0
next prev parent reply other threads:[~2026-07-15 5:11 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-15 5:11 [PATCH 0/4] ASoC: tegra: Simplify error handling phucduc.bui
2026-07-15 5:11 ` [PATCH 1/4] ASoC: tegra: tegra20_das: Use dev_err_probe() for " phucduc.bui
2026-07-15 5:11 ` phucduc.bui [this message]
2026-07-15 5:11 ` [PATCH 3/4] ASoC: tegra: tegra210_amx: Return the original error directly phucduc.bui
2026-07-15 5:11 ` [PATCH 4/4] ASoC: tegra: tegra210: Use devm_clk_get_optional() for sync_input clock phucduc.bui
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=20260715051115.17385-3-phucduc.bui@gmail.com \
--to=phucduc.bui@gmail.com \
--cc=bhelgaas@google.com \
--cc=broonie@kernel.org \
--cc=jonathanh@nvidia.com \
--cc=krzysztof.kozlowski@oss.qualcomm.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=o-takashi@sakamocchi.jp \
--cc=perex@perex.cz \
--cc=piyushpatle228@gmail.com \
--cc=rosenp@gmail.com \
--cc=sheetal@nvidia.com \
--cc=thierry.reding@kernel.org \
--cc=tiwai@suse.com \
--cc=u.kleine-koenig@baylibre.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.