]> git.baikalelectronics.ru Git - kernel.git/commit
media: ov9650: remove unnecessary terminated entry in menu items array
authorAkinobu Mita <akinobu.mita@gmail.com>
Mon, 23 Oct 2017 17:30:26 +0000 (13:30 -0400)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Tue, 31 Oct 2017 16:09:44 +0000 (12:09 -0400)
commit52038830fa5c9cac5f962917e88315eaff1e6ab5
treed76a59e5eb77206f26e96ab1c6cf0eae54e882c7
parent513755ee42ff74a2572282430c922d1136d9ae08
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>
drivers/media/i2c/ov9650.c