From: Jelle Foks Date: Sat, 18 Nov 2006 18:47:11 +0000 (-0300) Subject: V4L/DVB (4838): Fix cx88-blackbird null pointer X-Git-Tag: v2.6.20-rc1~145^2~5^2~84 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=49c6b46a05ade5e1c572431844b77755527a152c;p=linux-2.6 V4L/DVB (4838): Fix cx88-blackbird null pointer 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 Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/video/cx88/cx88-blackbird.c b/drivers/media/video/cx88/cx88-blackbird.c index 0037188d77..0cf0360588 100644 --- a/drivers/media/video/cx88/cx88-blackbird.c +++ b/drivers/media/video/cx88/cx88-blackbird.c @@ -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;