Unverified Commit 8658c4eb authored by Everest K.C's avatar Everest K.C Committed by Mark Brown
Browse files

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: default avatarEverest K.C. <everestkc@everestkc.com.np>
Link: https://patch.msgid.link/20241008234422.5274-1-everestkc@everestkc.com.np


Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 2aab7d18
Loading
Loading
Loading
Loading
+2 −6
Original line number Diff line number Diff line
@@ -611,12 +611,8 @@ static int rt721_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)
		else /* ADC gain */
			ctl = p->max - (((vol_max - regvalue) & 0xffff) / interval_offset);
			else
				ctl = p->max - (((0 - regvalue) & 0xffff) / interval_offset);
		}

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