summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHenrik Kretzschmar <henne@nachtwindheim.de>2008-08-22 16:41:03 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2008-10-12 09:36:52 -0200
commitee7aa9f821b27674f36fc09413914b68f7ad97ca (patch)
treebf357d883b93153189119b715eed54c287f1368b
parentef0e3c26efe9c52de62b96fdad94de3ed70489d0 (diff)
V4L/DVB (8750): V4L: check inval in video_register_device_index()
Better check the video_device pointer before using it. Signed-off-by: Henrik Kretzschmar <henne@nachtwindheim.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
-rw-r--r--drivers/media/video/v4l2-dev.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/media/video/v4l2-dev.c b/drivers/media/video/v4l2-dev.c
index 6b9f3cb0de9..8903e41628e 100644
--- a/drivers/media/video/v4l2-dev.c
+++ b/drivers/media/video/v4l2-dev.c
@@ -257,6 +257,9 @@ int video_register_device_index(struct video_device *vfd, int type, int nr,
if (vfd == NULL)
return -EINVAL;
+ if (vfd == NULL)
+ return -EINVAL;
+
switch (type) {
case VFL_TYPE_GRABBER:
base = MINOR_VFL_TYPE_GRABBER_MIN;