diff options
author | Henrik Kretzschmar <henne@nachtwindheim.de> | 2008-09-03 17:11:53 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2008-09-03 18:37:11 -0300 |
commit | f3b9f50ef771670b5d94c568241d6766691c6c18 (patch) | |
tree | 86fd5e9b33f381d7e3f5a67641958f42d4462fee /drivers/media/video | |
parent | 5b5aff83a549c8f1e425e06d46ec951eae950b37 (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')
-rw-r--r-- | drivers/media/video/v4l2-dev.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/media/video/v4l2-dev.c b/drivers/media/video/v4l2-dev.c index 0320fb84119c..155fdec9ac7d 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, int ret; char *name_base; + if (vfd == NULL) + return -EINVAL; + switch (type) { case VFL_TYPE_GRABBER: base = MINOR_VFL_TYPE_GRABBER_MIN; |