diff options
author | Takashi Iwai <tiwai@suse.de> | 2023-05-24 12:14:24 +0200 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2023-05-24 12:14:24 +0200 |
commit | bac4d8220b7227e317caeadf5ed05c61cd5dc21c (patch) | |
tree | 47b53fec64780a300ab4a60363329945f7ee500b /sound/soc/codecs/lpass-tx-macro.c | |
parent | 81302b1c7c997e8a56c1c2fc63a296ebeb0cd2d0 (diff) | |
parent | 011a8719d6105dcb48077ea7a6a88ac019d4aa50 (diff) |
Merge tag 'asoc-fix-v6.4-rc3' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus
ASoC: Fixes for v6.4
A collection of fixes for v6.4, mostly driver specific but there's also
one fix for DPCM to avoid incorrectly repeated calls to prepare() which
can trigger issues on some systems.
Diffstat (limited to 'sound/soc/codecs/lpass-tx-macro.c')
-rw-r--r-- | sound/soc/codecs/lpass-tx-macro.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sound/soc/codecs/lpass-tx-macro.c b/sound/soc/codecs/lpass-tx-macro.c index da6fcf7f0991..de978c3d70b7 100644 --- a/sound/soc/codecs/lpass-tx-macro.c +++ b/sound/soc/codecs/lpass-tx-macro.c @@ -746,6 +746,8 @@ static int tx_macro_put_dec_enum(struct snd_kcontrol *kcontrol, struct tx_macro *tx = snd_soc_component_get_drvdata(component); val = ucontrol->value.enumerated.item[0]; + if (val >= e->items) + return -EINVAL; switch (e->reg) { case CDC_TX_INP_MUX_ADC_MUX0_CFG0: @@ -772,6 +774,9 @@ static int tx_macro_put_dec_enum(struct snd_kcontrol *kcontrol, case CDC_TX_INP_MUX_ADC_MUX7_CFG0: mic_sel_reg = CDC_TX7_TX_PATH_CFG0; break; + default: + dev_err(component->dev, "Error in configuration!!\n"); + return -EINVAL; } if (val != 0) { |