diff options
author | Takashi Iwai <tiwai@suse.de> | 2013-09-30 10:49:45 +0200 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2013-09-30 10:49:45 +0200 |
commit | 6ae405996ca4a656fbc939ed4f0a4c5b2f8925a7 (patch) | |
tree | ef7007442ea510ecd36f225957e251a8e6bd336e /sound/soc/codecs/ab8500-codec.c | |
parent | ALSA: hda - Enable internal mic on a Thinkpad machine with ALC283 (diff) | |
parent | Merge remote-tracking branch 'asoc/fix/max98095' into asoc-linus (diff) | |
download | linux-6ae405996ca4a656fbc939ed4f0a4c5b2f8925a7.tar.xz linux-6ae405996ca4a656fbc939ed4f0a4c5b2f8925a7.zip |
Merge tag 'asoc-v3.12-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus
ASoC: Fixes for v3.12
Nothing too exciting here, all driver specific except for the fix from
Liam for DPCM systems which have both front and back end DAIs which is
not yet used by anything in mainline.
Diffstat (limited to 'sound/soc/codecs/ab8500-codec.c')
-rw-r--r-- | sound/soc/codecs/ab8500-codec.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/sound/soc/codecs/ab8500-codec.c b/sound/soc/codecs/ab8500-codec.c index b8ba0adacfce..80555d7551e6 100644 --- a/sound/soc/codecs/ab8500-codec.c +++ b/sound/soc/codecs/ab8500-codec.c @@ -1225,13 +1225,18 @@ static int anc_status_control_put(struct snd_kcontrol *kcontrol, struct ab8500_codec_drvdata *drvdata = dev_get_drvdata(codec->dev); struct device *dev = codec->dev; bool apply_fir, apply_iir; - int req, status; + unsigned int req; + int status; dev_dbg(dev, "%s: Enter.\n", __func__); mutex_lock(&drvdata->anc_lock); req = ucontrol->value.integer.value[0]; + if (req >= ARRAY_SIZE(enum_anc_state)) { + status = -EINVAL; + goto cleanup; + } if (req != ANC_APPLY_FIR_IIR && req != ANC_APPLY_FIR && req != ANC_APPLY_IIR) { dev_err(dev, "%s: ERROR: Unsupported status to set '%s'!\n", |