From: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
To: broonie@kernel.org
Cc: lgirdwood@gmail.com, perex@perex.cz, tiwai@suse.com,
pierre-louis.bossart@linux.intel.com,
alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org,
Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Subject: [PATCH 2/4] ASoC: codecs: wcd934x: remove redundant ret variable
Date: Tue, 30 Nov 2021 16:05:05 +0000 [thread overview]
Message-ID: <20211130160507.22180-3-srinivas.kandagatla@linaro.org> (raw)
In-Reply-To: <20211130160507.22180-1-srinivas.kandagatla@linaro.org>
return value form snd_soc_dapm_put_enum_double() directly instead
of taking this in another redundant variable.
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
---
sound/soc/codecs/wcd934x.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/sound/soc/codecs/wcd934x.c b/sound/soc/codecs/wcd934x.c
index eb4e2f2a24ae..3294c685d4d8 100644
--- a/sound/soc/codecs/wcd934x.c
+++ b/sound/soc/codecs/wcd934x.c
@@ -3420,7 +3420,7 @@ static int wcd934x_int_dem_inp_mux_put(struct snd_kcontrol *kc,
{
struct soc_enum *e = (struct soc_enum *)kc->private_value;
struct snd_soc_component *component;
- int reg, val, ret;
+ int reg, val;
component = snd_soc_dapm_kcontrol_component(kc);
val = ucontrol->value.enumerated.item[0];
@@ -3443,9 +3443,7 @@ static int wcd934x_int_dem_inp_mux_put(struct snd_kcontrol *kc,
WCD934X_RX_DLY_ZN_EN_MASK,
WCD934X_RX_DLY_ZN_DISABLE);
- ret = snd_soc_dapm_put_enum_double(kc, ucontrol);
-
- return ret;
+ return snd_soc_dapm_put_enum_double(kc, ucontrol);
}
static int wcd934x_dec_enum_put(struct snd_kcontrol *kcontrol,
--
2.21.0
next prev parent reply other threads:[~2021-11-30 16:05 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-30 16:05 [PATCH 0/4] ASoC: codecs: Qualcomm codecs fix kcontrol put return values Srinivas Kandagatla
2021-11-30 16:05 ` [PATCH 1/4] ASoC: codecs: wcd934x: handle channel mappping list correctly Srinivas Kandagatla
2021-11-30 16:05 ` Srinivas Kandagatla [this message]
2021-11-30 16:31 ` [PATCH 2/4] ASoC: codecs: wcd934x: remove redundant ret variable Mark Brown
2021-11-30 16:33 ` Srinivas Kandagatla
2021-11-30 16:37 ` Mark Brown
2021-11-30 16:05 ` [PATCH 3/4] ASoC: codecs: wcd934x: return correct value from mixer put Srinivas Kandagatla
2021-11-30 16:05 ` [PATCH 4/4] ASoC: codecs: wsa881x: fix return values from kcontrol put Srinivas Kandagatla
2021-12-01 18:32 ` [PATCH 0/4] ASoC: codecs: Qualcomm codecs fix kcontrol put return values 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=20211130160507.22180-3-srinivas.kandagatla@linaro.org \
--to=srinivas.kandagatla@linaro.org \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=perex@perex.cz \
--cc=pierre-louis.bossart@linux.intel.com \
--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;
as well as URLs for NNTP newsgroup(s).