diff options
author | Mark Brown <broonie@linaro.org> | 2013-09-27 14:56:20 +0100 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2013-09-27 14:56:20 +0100 |
commit | 92396e78d339e1ba8c50e69fee96197a56d3911a (patch) | |
tree | 7ccf274d046c0afe3bf24d6344e45adb51af1022 /sound | |
parent | 448c3f6884700fc467669d4453b7f5983a5ba1cb (diff) | |
parent | d63733aed90b432e5cc489ddfa28e342f91b4652 (diff) | |
download | op-kernel-dev-92396e78d339e1ba8c50e69fee96197a56d3911a.zip op-kernel-dev-92396e78d339e1ba8c50e69fee96197a56d3911a.tar.gz |
Merge remote-tracking branch 'asoc/fix/ab8500' into asoc-linus
Diffstat (limited to 'sound')
-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 b8ba0ad..80555d7 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", |