summaryrefslogtreecommitdiff
path: root/drivers/media
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2011-10-24 05:03:27 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2011-11-08 10:29:05 -0200
commitb36b505965e374b284166c2e6b9c1d369d663ea9 (patch)
tree9fb6b153465e712422dc3ed57381c4be9b36a0c9 /drivers/media
parent60659dd49509f255ad9748411cd4eb3c74a8d8a9 (diff)
[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>
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/video/v4l2-event.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/media/video/v4l2-event.c b/drivers/media/video/v4l2-event.c
index 53b190cf225e..9f56f18d509f 100644
--- a/drivers/media/video/v4l2-event.c
+++ b/drivers/media/video/v4l2-event.c
@@ -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) {