Skip to content

Commit 38929ea

Browse files
andy-shevmchehab
authored andcommitted
media: v4l2-ctrls: Don't validate BITMASK twice
There is no need to repeat what check_range() does for us, i.e. BITMASK validation in v4l2_ctrl_new(). Signed-off-by: Andy Shevchenko <[email protected]> Acked-by: Sakari Ailus <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
1 parent 55a839a commit 38929ea

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

drivers/media/v4l2-core/v4l2-ctrls.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2013,10 +2013,6 @@ static struct v4l2_ctrl *v4l2_ctrl_new(struct v4l2_ctrl_handler *hdl,
20132013
handler_set_err(hdl, err);
20142014
return NULL;
20152015
}
2016-
if (type == V4L2_CTRL_TYPE_BITMASK && ((def & ~max) || min || step)) {
2017-
handler_set_err(hdl, -ERANGE);
2018-
return NULL;
2019-
}
20202016
if (is_array &&
20212017
(type == V4L2_CTRL_TYPE_BUTTON ||
20222018
type == V4L2_CTRL_TYPE_CTRL_CLASS)) {

0 commit comments

Comments
 (0)