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: rt712-sdca: remove redundant else path of if statement

There is an if/else check where the else part is executed if
adc_vol_flag is true, this else path checks if adc_vol_flag
is true (which is a redundant second check) and the if path is
always taken. Remove the redundant check and remove the else
path since that can never occur.

Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
Link: https://patch.msgid.link/20250508084527.316380-1-colin.i.king@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Colin Ian King and committed by
Mark Brown
4815e9fc 07cb9b51

+2 -6
+2 -6
sound/soc/codecs/rt712-sdca-dmic.c
··· 263 263 264 264 if (!adc_vol_flag) /* boost gain */ 265 265 ctl = regvalue / 0x0a00; 266 - else { /* ADC gain */ 267 - if (adc_vol_flag) 268 - ctl = p->max - (((0x1e00 - regvalue) & 0xffff) / interval_offset); 269 - else 270 - ctl = p->max - (((0 - regvalue) & 0xffff) / interval_offset); 271 - } 266 + else /* ADC gain */ 267 + ctl = p->max - (((0x1e00 - regvalue) & 0xffff) / interval_offset); 272 268 273 269 ucontrol->value.integer.value[i] = ctl; 274 270 }