diff mbox series

[2/4] ASoC: codecs: wcd934x: remove redundant ret variable

Message ID 20211130160507.22180-3-srinivas.kandagatla@linaro.org (mailing list archive)
State Accepted
Commit b80155fe61a76784273c2e7b8b15ae8249eb7440
Headers show
Series ASoC: codecs: Qualcomm codecs fix kcontrol put return values | expand

Commit Message

Srinivas Kandagatla Nov. 30, 2021, 4:05 p.m. UTC
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(-)

Comments

Mark Brown Nov. 30, 2021, 4:31 p.m. UTC | #1
On Tue, Nov 30, 2021 at 04:05:05PM +0000, Srinivas Kandagatla wrote:
> return value form snd_soc_dapm_put_enum_double() directly instead
> of taking this in another redundant variable.

Cleanups like this should come after any fixes in a series.
Srinivas Kandagatla Nov. 30, 2021, 4:33 p.m. UTC | #2
On 30/11/2021 16:31, Mark Brown wrote:
> On Tue, Nov 30, 2021 at 04:05:05PM +0000, Srinivas Kandagatla wrote:
>> return value form snd_soc_dapm_put_enum_double() directly instead
>> of taking this in another redundant variable.
> 
> Cleanups like this should come after any fixes in a series.
> 

Noted, do you want me to resend a v2 fixing the order?

--srini
Mark Brown Nov. 30, 2021, 4:37 p.m. UTC | #3
On Tue, Nov 30, 2021 at 04:33:38PM +0000, Srinivas Kandagatla wrote:
> 
> 
> On 30/11/2021 16:31, Mark Brown wrote:
> > On Tue, Nov 30, 2021 at 04:05:05PM +0000, Srinivas Kandagatla wrote:
> > > return value form snd_soc_dapm_put_enum_double() directly instead
> > > of taking this in another redundant variable.

> > Cleanups like this should come after any fixes in a series.

> Noted, do you want me to resend a v2 fixing the order?

It should be fine, I'll let you know if it's needed.
diff mbox series

Patch

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,