projects
/
GitHub
/
moto-9609
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
959f585
)
ASoC: ml26124: Fix negative array index read
author
Takashi Iwai
<tiwai@suse.de>
Wed, 30 Oct 2013 17:40:04 +0000
(18:40 +0100)
committer
Mark Brown
<broonie@linaro.org>
Wed, 30 Oct 2013 21:33:08 +0000
(14:33 -0700)
get_coeff() may return an error.
Spotted by coverity CID 703394.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
sound/soc/codecs/ml26124.c
patch
|
blob
|
blame
|
history
diff --git
a/sound/soc/codecs/ml26124.c
b/sound/soc/codecs/ml26124.c
index 26118828782b9b5b4ced3c372ccf128b971cebde..185fa3bc3052c826dd71f74cf0e52b6945aaae2c 100644
(file)
--- a/
sound/soc/codecs/ml26124.c
+++ b/
sound/soc/codecs/ml26124.c
@@
-342,6
+342,8
@@
static int ml26124_hw_params(struct snd_pcm_substream *substream,
struct ml26124_priv *priv = snd_soc_codec_get_drvdata(codec);
int i = get_coeff(priv->mclk, params_rate(hw_params));
+ if (i < 0)
+ return i;
priv->substream = substream;
priv->rate = params_rate(hw_params);