summaryrefslogtreecommitdiff
path: root/drivers/media
diff options
context:
space:
mode:
authorAkinobu Mita <akinobu.mita@gmail.com>2017-10-23 13:30:26 -0400
committerMauro Carvalho Chehab <mchehab@s-opensource.com>2017-10-31 12:09:44 -0400
commitf283c01b8094da9454f4b51c997f578227c29d95 (patch)
treed76a59e5eb77206f26e96ab1c6cf0eae54e882c7 /drivers/media
parentdae82d9d47e0ffeed7f7efee4e760863cf6fd542 (diff)
media: ov9650: remove unnecessary terminated entry in menu items array
The test_pattern_menu[] array has two valid items and a null terminated item. So the control's maximum value which is passed to v4l2_ctrl_new_std_menu_items() should be one. However, 'ARRAY_SIZE(test_pattern_menu) - 1' is actually passed and it's not correct. Fix it by removing unnecessary terminated entry and let the correct control's maximum value be passed to v4l2_ctrl_new_std_menu_items(). Cc: Sylwester Nawrocki <sylvester.nawrocki@gmail.com> Cc: Mauro Carvalho Chehab <mchehab@s-opensource.com> Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/i2c/ov9650.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/drivers/media/i2c/ov9650.c b/drivers/media/i2c/ov9650.c
index 6ffb460e8589..69433e1e2533 100644
--- a/drivers/media/i2c/ov9650.c
+++ b/drivers/media/i2c/ov9650.c
@@ -985,7 +985,6 @@ static const struct v4l2_ctrl_ops ov965x_ctrl_ops = {
static const char * const test_pattern_menu[] = {
"Disabled",
"Color bars",
- NULL
};
static int ov965x_initialize_controls(struct ov965x *ov965x)