]> git.baikalelectronics.ru Git - kernel.git/commitdiff
ASoC: remove unneeded variable
authorchiminghao <chi.minghao@zte.com.cn>
Thu, 9 Dec 2021 01:57:07 +0000 (01:57 +0000)
committerMark Brown <broonie@kernel.org>
Fri, 24 Dec 2021 14:06:58 +0000 (14:06 +0000)
return value form directly instead of
taking this in another redundant variable.

Reported-by: Zeal Robot <zealci@zte.com.cm>
Signed-off-by: chiminghao <chi.minghao@zte.com.cn>
Link: https://lore.kernel.org/r/20211209015707.409870-1-chi.minghao@zte.com.cn
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/mt6660.c
sound/soc/codecs/wcd938x.c

index 358c500377dff283ccfcd3fbc8ff2b3679a0fce2..3a881523c30ff7f933c623d3d0aeadbe4c6117e6 100644 (file)
@@ -47,13 +47,12 @@ static int mt6660_reg_write(void *context, unsigned int reg, unsigned int val)
        struct mt6660_chip *chip = context;
        int size = mt6660_get_reg_size(reg);
        u8 reg_data[4];
-       int i, ret;
+       int i;
 
        for (i = 0; i < size; i++)
                reg_data[size - i - 1] = (val >> (8 * i)) & 0xff;
 
-       ret = i2c_smbus_write_i2c_block_data(chip->i2c, reg, size, reg_data);
-       return ret;
+       return i2c_smbus_write_i2c_block_data(chip->i2c, reg, size, reg_data);
 }
 
 static int mt6660_reg_read(void *context, unsigned int reg, unsigned int *val)
index 67151c7770c65064f55ad7378a6ba794f93bf7b7..54152b57eeeb76e2f291a5d62209ef0a0ed85c43 100644 (file)
@@ -3086,7 +3086,7 @@ static int wcd938x_mbhc_micb_ctrl_threshold_mic(struct snd_soc_component *compon
                                                int micb_num, bool req_en)
 {
        struct wcd938x_priv *wcd938x = snd_soc_component_get_drvdata(component);
-       int rc, micb_mv;
+       int micb_mv;
 
        if (micb_num != MIC_BIAS_2)
                return -EINVAL;
@@ -3100,9 +3100,7 @@ static int wcd938x_mbhc_micb_ctrl_threshold_mic(struct snd_soc_component *compon
 
        micb_mv = req_en ? WCD_MBHC_THR_HS_MICB_MV : wcd938x->micb2_mv;
 
-       rc = wcd938x_mbhc_micb_adjust_voltage(component, micb_mv, MIC_BIAS_2);
-
-       return rc;
+       return wcd938x_mbhc_micb_adjust_voltage(component, micb_mv, MIC_BIAS_2);
 }
 
 static inline void wcd938x_mbhc_get_result_params(struct wcd938x_priv *wcd938x,