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

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

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

parents b4d29963 3154eb1d
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -1208,6 +1208,14 @@ static int taiko_mad_input_put(struct snd_kcontrol *kcontrol,

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

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


	micb_4_int_reg = taiko->resmgr.reg_addr->micb_4_int_rbias;
	pr_debug("%s: taiko_mad_input = %s\n", __func__,
			taiko_conn_mad_text[taiko_mad_input]);