Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 90966391 authored by Dan Carpenter's avatar Dan Carpenter Committed by Mark Brown
Browse files

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: default avatarDan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: default avatarAxel Lin <axel.lin@ingics.com>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 9dcc72ef
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -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: