Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

authored by

Everest K.C and committed by
Mark Brown
8658c4eb 2aab7d18

+2 -6
+2 -6
sound/soc/codecs/rt721-sdca.c
··· 611 611 612 612 if (!adc_vol_flag) /* boost gain */ 613 613 ctl = regvalue / boost_step; 614 - else { /* ADC gain */ 615 - if (adc_vol_flag) 616 - ctl = p->max - (((vol_max - regvalue) & 0xffff) / interval_offset); 617 - else 618 - ctl = p->max - (((0 - regvalue) & 0xffff) / interval_offset); 619 - } 614 + else /* ADC gain */ 615 + ctl = p->max - (((vol_max - regvalue) & 0xffff) / interval_offset); 620 616 621 617 ucontrol->value.integer.value[i] = ctl; 622 618 }