]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
V4L/DVB (8750): V4L: check inval in video_register_device_index()
authorHenrik Kretzschmar <henne@nachtwindheim.de>
Fri, 22 Aug 2008 19:41:03 +0000 (16:41 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Sun, 12 Oct 2008 11:36:52 +0000 (09:36 -0200)
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>
drivers/media/video/v4l2-dev.c

index 6b9f3cb0de989251655d1bd3a113b93c3627d783..8903e41628eb95abb9345f7b0ae731214fbf9ba7 100644 (file)
@@ -254,6 +254,9 @@ int video_register_device_index(struct video_device *vfd, int type, int nr,
        int ret;
        char *name_base;
 
+       if (vfd == NULL)
+               return -EINVAL;
+
        if (vfd == NULL)
                return -EINVAL;