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: rt722-sdca: Remove logically deadcode in rt722-sdca.c

As the same condition was checked in inner and outer if statements.
The code never reaches the inner else statement.
Fix this by removing the logically dead inner else statement.

Fixes: 7f5d6036ca00 ("ASoC: rt722-sdca: Add RT722 SDCA driver")
Reported-by: Shuah Khan <skhan@linuxfoundation.org>
Closes: https://lore.kernel.org/all/e44527e8-b7c6-4712-97a6-d54f02ad2dc9@linuxfoundation.org/
Signed-off-by: Everest K.C. <everestkc@everestkc.com.np>
Reviewed-by: Shuah Khan <skhan@linuxfoundation.org>
Link: https://patch.msgid.link/20241010175755.5278-1-everestkc@everestkc.com.np
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Everest K.C and committed by
Mark Brown
22206e56 c1789209

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