Commit b36b5059 authored by Hans de Goede's avatar Hans de Goede Committed by Mauro Carvalho Chehab

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

Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
Acked-by: default avatarLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 60659dd4
......@@ -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) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment