diff options
author | 2024-10-08 17:44:20 -0600 | |
---|---|---|
committer | 2024-10-10 12:16:37 +0100 | |
commit | 8658c4eb9d6b76311322c1b74b3d4e0dec3599d8 (patch) | |
tree | adc8cd77c93881dca8b517c05a4bfc4e60941d87 | |
parent | ASoC: qcom: sm8250: correct typo in shutdown function name (diff) | |
download | wireguard-linux-8658c4eb9d6b76311322c1b74b3d4e0dec3599d8.tar.xz wireguard-linux-8658c4eb9d6b76311322c1b74b3d4e0dec3599d8.zip |
ASoC: rt721-sdca: Clean logically deadcode in rt721-sdca.c
As the same condition was checked in inner and outer if
statements. The code never reaches the inner else statement.
This issue was reported by Coverity Scan with CID = 1600271.
Signed-off-by: Everest K.C. <everestkc@everestkc.com.np>
Link: https://patch.msgid.link/20241008234422.5274-1-everestkc@everestkc.com.np
Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r-- | sound/soc/codecs/rt721-sdca.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/sound/soc/codecs/rt721-sdca.c b/sound/soc/codecs/rt721-sdca.c index 201cb667c8c1..bdd160b80b64 100644 --- a/sound/soc/codecs/rt721-sdca.c +++ b/sound/soc/codecs/rt721-sdca.c @@ -611,12 +611,8 @@ static int rt721_sdca_dmic_set_gain_get(struct snd_kcontrol *kcontrol, if (!adc_vol_flag) /* boost gain */ ctl = regvalue / boost_step; - else { /* ADC gain */ - if (adc_vol_flag) - ctl = p->max - (((vol_max - regvalue) & 0xffff) / interval_offset); - else - ctl = p->max - (((0 - regvalue) & 0xffff) / interval_offset); - } + else /* ADC gain */ + ctl = p->max - (((vol_max - regvalue) & 0xffff) / interval_offset); ucontrol->value.integer.value[i] = ctl; } |