This is a note to let you know that I've just added the patch titled ASoC: rt722-sdca: Remove logically deadcode in rt722-sdca.c to the 6.11-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: asoc-rt722-sdca-remove-logically-deadcode-in-rt722-s.patch and it can be found in the queue-6.11 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. commit c9bc8b4717e3030ea314f26799946a322ef636eb Author: Everest K.C <everestkc@xxxxxxxxxxxxxxxx> Date: Thu Oct 10 11:57:54 2024 -0600 ASoC: rt722-sdca: Remove logically deadcode in rt722-sdca.c [ Upstream commit 22206e569fb54bf9c95db9a0138a7485ba9e13bc ] 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@xxxxxxxxxxxxxxxxxxx> Closes: https://lore.kernel.org/all/e44527e8-b7c6-4712-97a6-d54f02ad2dc9@xxxxxxxxxxxxxxxxxxx/ Signed-off-by: Everest K.C. <everestkc@xxxxxxxxxxxxxxxx> Reviewed-by: Shuah Khan <skhan@xxxxxxxxxxxxxxxxxxx> Link: https://patch.msgid.link/20241010175755.5278-1-everestkc@xxxxxxxxxxxxxxxx Signed-off-by: Mark Brown <broonie@xxxxxxxxxx> Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx> diff --git a/sound/soc/codecs/rt722-sdca.c b/sound/soc/codecs/rt722-sdca.c index e5bd9ef812de1..f9f7512ca3608 100644 --- a/sound/soc/codecs/rt722-sdca.c +++ b/sound/soc/codecs/rt722-sdca.c @@ -607,12 +607,8 @@ static int rt722_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; }