[media] v4l2-event: Deny subscribing with a type of V4L2_EVENT_ALL

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
This commit is contained in:
Hans de Goede 2011-10-24 05:03:27 -03:00 committed by Mauro Carvalho Chehab
parent 60659dd495
commit b36b505965
1 changed files with 3 additions and 0 deletions

View File

@ -215,6 +215,9 @@ int v4l2_event_subscribe(struct v4l2_fh *fh,
unsigned long flags;
unsigned i;
if (sub->type == V4L2_EVENT_ALL)
return -EINVAL;
if (elems < 1)
elems = 1;
if (sub->type == V4L2_EVENT_CTRL) {