summaryrefslogtreecommitdiffstats
path: root/sound/soc
diff options
context:
space:
mode:
authorMark Brown <broonie@linaro.org>2013-11-08 11:43:43 +0100
committerMark Brown <broonie@linaro.org>2013-11-08 11:43:43 +0100
commitdd212bd5bb8b15889821ef79213cdb5bd47c6f85 (patch)
tree76544b0de597d75b2fad4a183f63408aba32186d /sound/soc
parentMerge remote-tracking branch 'asoc/topic/wm8962' into asoc-next (diff)
parentASoC: wm8996: Fix negative array index read (diff)
downloadlinux-dd212bd5bb8b15889821ef79213cdb5bd47c6f85.tar.xz
linux-dd212bd5bb8b15889821ef79213cdb5bd47c6f85.zip
Merge remote-tracking branch 'asoc/topic/wm8996' into asoc-next
Diffstat (limited to 'sound/soc')
-rw-r--r--sound/soc/codecs/wm8996.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sound/soc/codecs/wm8996.c b/sound/soc/codecs/wm8996.c
index d666de03704a..1a7655b0aa22 100644
--- a/sound/soc/codecs/wm8996.c
+++ b/sound/soc/codecs/wm8996.c
@@ -438,6 +438,8 @@ static int wm8996_get_retune_mobile_enum(struct snd_kcontrol *kcontrol,
struct wm8996_priv *wm8996 = snd_soc_codec_get_drvdata(codec);
int block = wm8996_get_retune_mobile_block(kcontrol->id.name);
+ if (block < 0)
+ return block;
ucontrol->value.enumerated.item[0] = wm8996->retune_mobile_cfg[block];
return 0;