]> err.no Git - linux-2.6/commitdiff
V4L/DVB (4838): Fix cx88-blackbird null pointer
authorJelle Foks <jelle@foks.8m.com>
Sat, 18 Nov 2006 18:47:11 +0000 (15:47 -0300)
committerMauro Carvalho Chehab <mchehab@infradead.org>
Sun, 10 Dec 2006 10:51:29 +0000 (08:51 -0200)
Allows 'debug=1' for cx88-blackbird module (dev needs to be valid for
dprintk). Fixes a null-pointer dereference when using debug=1.

Signed-off-by: Jelle Foks <jelle@foks.8m.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
drivers/media/video/cx88/cx88-blackbird.c

index 0037188d77d469a1abdc3ea61b3f41718d250fb6..0cf0360588e6c8d30e562f7945f3a5bdd263d143 100644 (file)
@@ -942,9 +942,10 @@ static int mpeg_open(struct inode *inode, struct file *file)
        struct cx8802_driver *drv = NULL;
        int err;
 
+       dev = cx8802_get_device(inode);
+
        dprintk( 1, "%s\n", __FUNCTION__);
 
-       dev = cx8802_get_device(inode);
        if (dev == NULL)
                return -ENODEV;