Unverified Commit 4815e9fc authored by Colin Ian King's avatar Colin Ian King Committed by Mark Brown
Browse files

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: default avatarColin Ian King <colin.i.king@gmail.com>
Link: https://patch.msgid.link/20250508084527.316380-1-colin.i.king@gmail.com


Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 07cb9b51
Loading
Loading
Loading
Loading
+2 −6
Original line number Diff line number Diff line
@@ -263,12 +263,8 @@ static int rt712_sdca_dmic_set_gain_get(struct snd_kcontrol *kcontrol,

		if (!adc_vol_flag) /* boost gain */
			ctl = regvalue / 0x0a00;
		else { /* ADC gain */
			if (adc_vol_flag)
		else /* ADC gain */
			ctl = p->max - (((0x1e00 - regvalue) & 0xffff) / interval_offset);
			else
				ctl = p->max - (((0 - regvalue) & 0xffff) / interval_offset);
		}

		ucontrol->value.integer.value[i] = ctl;
	}