Skip to content

Commit

Permalink
[media] v4l2-event: Deny subscribing with a type of V4L2_EVENT_ALL
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Hans de Goede authored and Mauro Carvalho Chehab committed Nov 8, 2011
1 parent 60659dd commit b36b505
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/media/video/v4l2-event.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit b36b505

Please sign in to comment.