projects
/
linux-2.6-microblaze.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2aab7d1
)
ASoC: rt721-sdca: Clean logically deadcode in rt721-sdca.c
author
Everest K.C
<everestkc@everestkc.com.np>
Tue, 8 Oct 2024 23:44:20 +0000
(17:44 -0600)
committer
Mark Brown
<broonie@kernel.org>
Thu, 10 Oct 2024 11:16:37 +0000
(12:16 +0100)
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>
sound/soc/codecs/rt721-sdca.c
patch
|
blob
|
history
diff --git
a/sound/soc/codecs/rt721-sdca.c
b/sound/soc/codecs/rt721-sdca.c
index
201cb66
..
bdd160b
100644
(file)
--- 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;
}