aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2011-10-24 04:03:27 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2011-11-08 07:29:05 -0500
commitb36b505965e374b284166c2e6b9c1d369d663ea9 (patch)
tree9fb6b153465e712422dc3ed57381c4be9b36a0c9 /drivers
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')
-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,
215 unsigned long flags; 215 unsigned long flags;
216 unsigned i; 216 unsigned i;
217 217
218 if (sub->type == V4L2_EVENT_ALL)
219 return -EINVAL;
220
218 if (elems < 1) 221 if (elems < 1)
219 elems = 1; 222 elems = 1;
220 if (sub->type == V4L2_EVENT_CTRL) { 223 if (sub->type == V4L2_EVENT_CTRL) {