提交 8b4b3036 编写于 作者: T Takashi Iwai 提交者: Mark Brown

ASoC: ml26124: Fix negative array index read

get_coeff() may return an error.

Spotted by coverity CID 703394.
Signed-off-by: NTakashi Iwai <tiwai@suse.de>
Signed-off-by: NMark Brown <broonie@linaro.org>
上级 959f5854
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册
新手
引导
客服 返回
顶部