mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-23 09:19:51 +00:00
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: Dan Carpenter <dan.carpenter@oracle.com> Reviewed-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
9dcc72efae
commit
9096639100
1 changed files with 2 additions and 0 deletions
|
@ -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:
|
||||
|
|
Loading…
Reference in a new issue