summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/media/i2c/mt9v111.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/i2c/mt9v111.c b/drivers/media/i2c/mt9v111.c
index 58d5f2224bff..70fad0940435 100644
--- a/drivers/media/i2c/mt9v111.c
+++ b/drivers/media/i2c/mt9v111.c
@@ -848,7 +848,7 @@ static int mt9v111_enum_frame_size(struct v4l2_subdev *subdev,
struct v4l2_subdev_pad_config *cfg,
struct v4l2_subdev_frame_size_enum *fse)
{
- if (fse->pad || fse->index > ARRAY_SIZE(mt9v111_frame_sizes))
+ if (fse->pad || fse->index >= ARRAY_SIZE(mt9v111_frame_sizes))
return -EINVAL;
fse->min_width = mt9v111_frame_sizes[fse->index].width;