summaryrefslogtreecommitdiff
path: root/sound/soc/codecs/wcd938x.c
diff options
context:
space:
mode:
authorchiminghao <chi.minghao@zte.com.cn>2021-12-09 04:57:07 +0300
committerMark Brown <broonie@kernel.org>2021-12-24 17:06:58 +0300
commitb2fde4deff854ca7d49ec735a8252d944418b64d (patch)
treef1f42d615d90c813f12fff41aa1f86d532e985e4 /sound/soc/codecs/wcd938x.c
parent9de2b9286a6dd16966959b3cb34fc2ddfd39213e (diff)
downloadlinux-b2fde4deff854ca7d49ec735a8252d944418b64d.tar.xz
ASoC: remove unneeded variable
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>
Diffstat (limited to 'sound/soc/codecs/wcd938x.c')
-rw-r--r--sound/soc/codecs/wcd938x.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/sound/soc/codecs/wcd938x.c b/sound/soc/codecs/wcd938x.c
index 67151c7770c6..54152b57eeeb 100644
--- a/sound/soc/codecs/wcd938x.c
+++ b/sound/soc/codecs/wcd938x.c
@@ -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,