summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xsound/soc/codecs/max9867.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sound/soc/codecs/max9867.c b/sound/soc/codecs/max9867.c
index f371a52fe29d..2a22fddeb6af 100755
--- a/sound/soc/codecs/max9867.c
+++ b/sound/soc/codecs/max9867.c
@@ -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: