summaryrefslogtreecommitdiffstats
path: root/drivers/media/video
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2011-10-24 10:03:27 +0200
committerMauro Carvalho Chehab <mchehab@redhat.com>2011-11-08 13:29:05 +0100
commitb36b505965e374b284166c2e6b9c1d369d663ea9 (patch)
tree9fb6b153465e712422dc3ed57381c4be9b36a0c9 /drivers/media/video
parent[media] MAINTAINERS: add a maintainer for s5p-mfc driver (diff)
downloadlinux-b36b505965e374b284166c2e6b9c1d369d663ea9.tar.xz
linux-b36b505965e374b284166c2e6b9c1d369d663ea9.zip
[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/video')
-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) {