This is an automatic generated email to let you know that the following patch were queued at the http://git.linuxtv.org/media_tree.git tree:
Subject: [media] v4l2-ctrls: only check def for menu, integer and boolean controls Author: Hans Verkuil <hverk...@xs4all.nl> Date: Wed Dec 29 14:27:05 2010 -0300 The 'def' field is only valid for menus, integers and booleans. Signed-off-by: Hans Verkuil <hverk...@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mche...@redhat.com> drivers/media/video/v4l2-ctrls.c | 9 ++++++++- 1 files changed, 8 insertions(+), 1 deletions(-) --- http://git.linuxtv.org/media_tree.git?a=commitdiff;h=fb72d3ed7cef79d8410d48afbaca15a28fa72f54 diff --git a/drivers/media/video/v4l2-ctrls.c b/drivers/media/video/v4l2-ctrls.c index 6c0fadc..8f81efc 100644 --- a/drivers/media/video/v4l2-ctrls.c +++ b/drivers/media/video/v4l2-ctrls.c @@ -962,13 +962,20 @@ static struct v4l2_ctrl *v4l2_ctrl_new(struct v4l2_ctrl_handler *hdl, /* Sanity checks */ if (id == 0 || name == NULL || id >= V4L2_CID_PRIVATE_BASE || - def < min || def > max || max < min || + max < min || (type == V4L2_CTRL_TYPE_INTEGER && step == 0) || (type == V4L2_CTRL_TYPE_MENU && qmenu == NULL) || (type == V4L2_CTRL_TYPE_STRING && max == 0)) { handler_set_err(hdl, -ERANGE); return NULL; } + if ((type == V4L2_CTRL_TYPE_INTEGER || + type == V4L2_CTRL_TYPE_MENU || + type == V4L2_CTRL_TYPE_BOOLEAN) && + (def < min || def > max)) { + handler_set_err(hdl, -ERANGE); + return NULL; + } if (type == V4L2_CTRL_TYPE_BUTTON) flags |= V4L2_CTRL_FLAG_WRITE_ONLY; _______________________________________________ linuxtv-commits mailing list linuxtv-commits@linuxtv.org http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits