mirror of
https://github.com/team-infusion-developers/android_kernel_samsung_msm8976.git
synced 2024-10-31 18:09:19 +00:00
Merge "ASoC: wcd9320: Fix out of bounds for mad input value"
This commit is contained in:
commit
797e984939
1 changed files with 8 additions and 0 deletions
|
@ -1204,6 +1204,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]);
|
||||
|
|
Loading…
Reference in a new issue