aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/v4l2-dev.c
diff options
context:
space:
mode:
authorHenrik Kretzschmar <henne@nachtwindheim.de>2008-08-22 15:41:03 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2008-10-12 07:36:52 -0400
commitee7aa9f821b27674f36fc09413914b68f7ad97ca (patch)
treebf357d883b93153189119b715eed54c287f1368b /drivers/media/video/v4l2-dev.c
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>
Diffstat (limited to 'drivers/media/video/v4l2-dev.c')
-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 6b9f3cb0de98..8903e41628eb 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,
257 if (vfd == NULL) 257 if (vfd == NULL)
258 return -EINVAL; 258 return -EINVAL;
259 259
260 if (vfd == NULL)
261 return -EINVAL;
262
260 switch (type) { 263 switch (type) {
261 case VFL_TYPE_GRABBER: 264 case VFL_TYPE_GRABBER:
262 base = MINOR_VFL_TYPE_GRABBER_MIN; 265 base = MINOR_VFL_TYPE_GRABBER_MIN;