提交 90966391 编写于 作者: D Dan Carpenter 提交者: Mark Brown

ASoC: max9867: silence and array overflow warning

Smatch complains that we might reach the end of this loop without
finding what we're looking for leading to a buffer overflow.
Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: NAxel Lin <axel.lin@ingics.com>
Signed-off-by: NMark Brown <broonie@kernel.org>
上级 9dcc72ef
......@@ -156,6 +156,8 @@ static inline int get_ni_value(int mclk, int rate)
if (ni_div[i].mclk >= mclk)
break;
}
if (i == ARRAY_SIZE(ni_div))
return -EINVAL;
switch (rate) {
case 8000:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册