projects
/
kernel
/
kernel-generic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
959f585
)
ASoC: wm8996: Fix negative array index read
author
Takashi Iwai
<tiwai@suse.de>
Wed, 30 Oct 2013 07:35:07 +0000
(08:35 +0100)
committer
Mark Brown
<broonie@linaro.org>
Wed, 30 Oct 2013 16:50:21 +0000
(09:50 -0700)
Spotted by coverity CID 146355.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
sound/soc/codecs/wm8996.c
patch
|
blob
|
history
diff --git
a/sound/soc/codecs/wm8996.c
b/sound/soc/codecs/wm8996.c
index
46fe83d
..
b70379e
100644
(file)
--- 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;