Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e4d6f8e0 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "ASoC: wcd9335: Fix out of bounds for mad input value"

parents 2af5d1b0 3bfe5a89
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -7575,6 +7575,13 @@ static int tasha_mad_input_put(struct snd_kcontrol *kcontrol,

	tasha_mad_input = ucontrol->value.integer.value[0];

	if (tasha_mad_input >= ARRAY_SIZE(tasha_conn_mad_text)) {
		dev_err(codec->dev,
			"%s: tasha_mad_input = %d out of bounds\n",
			__func__, tasha_mad_input);
		return -EINVAL;
	}

	if (!strcmp(tasha_conn_mad_text[tasha_mad_input], "NOTUSED1") ||
	    !strcmp(tasha_conn_mad_text[tasha_mad_input], "NOTUSED2") ||
	    !strcmp(tasha_conn_mad_text[tasha_mad_input], "NOTUSED3") ||