aboutsummaryrefslogtreecommitdiff
path: root/drivers/i2c/busses/i2c-stu300.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/i2c/busses/i2c-stu300.c')
-rw-r--r--drivers/i2c/busses/i2c-stu300.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/i2c/busses/i2c-stu300.c b/drivers/i2c/busses/i2c-stu300.c
index 1f5b38be73b..495be451d32 100644
--- a/drivers/i2c/busses/i2c-stu300.c
+++ b/drivers/i2c/busses/i2c-stu300.c
@@ -498,7 +498,7 @@ static int stu300_set_clk(struct stu300_dev *dev, unsigned long clkrate)
int i = 0;
/* Locate the apropriate clock setting */
- while (i < ARRAY_SIZE(stu300_clktable) &&
+ while (i < ARRAY_SIZE(stu300_clktable) - 1 &&
stu300_clktable[i].rate < clkrate)
i++;