diff options
author | Linus Walleij <linus.walleij@linaro.org> | 2013-10-16 10:05:53 +0200 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2013-10-16 10:05:53 +0200 |
commit | 263c43a4479ecce52c0fdc84b4620e146263d549 (patch) | |
tree | b29ad7d94892be7a40524400481f71a1c075a167 /sound/soc/codecs/ab8500-codec.c | |
parent | pinctrl: coh901: mark GPIO lines used for IRQ (diff) | |
parent | Linux 3.12-rc4 (diff) | |
download | linux-263c43a4479ecce52c0fdc84b4620e146263d549.tar.xz linux-263c43a4479ecce52c0fdc84b4620e146263d549.zip |
Merge tag 'v3.12-rc4' into devel
Linux 3.12-rc4
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", |