aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/v4l2-core/v4l2-event.c
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil@xs4all.nl>2015-06-23 06:20:23 -0300
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>2015-07-17 09:15:27 -0300
commitfb8dfda980bdaf178a7addb0a4f68574e390a9d9 (patch)
treef12908cce162366be501e77f88a639325f0eda99 /drivers/media/v4l2-core/v4l2-event.c
parent675a9a9fda4e9b8634e7e93668f4a8c1311c0db4 (diff)
[media] v4l2-event: v4l2_event_queue: do nothing if vdev == NULL
If the vdev pointer == NULL, then just return. This makes it easier for subdev drivers to use this function without having to check if the sd->devnode pointer is NULL or not. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'drivers/media/v4l2-core/v4l2-event.c')
-rw-r--r--drivers/media/v4l2-core/v4l2-event.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/media/v4l2-core/v4l2-event.c b/drivers/media/v4l2-core/v4l2-event.c
index 8761aab99de9..8d3171c6bee8 100644
--- a/drivers/media/v4l2-core/v4l2-event.c
+++ b/drivers/media/v4l2-core/v4l2-event.c
@@ -172,6 +172,9 @@ void v4l2_event_queue(struct video_device *vdev, const struct v4l2_event *ev)
unsigned long flags;
struct timespec timestamp;
+ if (vdev == NULL)
+ return;
+
ktime_get_ts(&timestamp);
spin_lock_irqsave(&vdev->fh_lock, flags);

Privacy Policy