summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@infradead.org>2006-11-18 16:47:11 -0200
committerMauro Carvalho Chehab <mchehab@infradead.org>2006-11-18 16:47:11 -0200
commit043876028d0d3cae66d35b96bcb62718199539cf (patch)
treec1f6b56c53b0dee7e2a4b730bb98b204df5534c0
parentc5facc9ca66a5686d9e49ffec96658c85939c6e8 (diff)
downloadmediapointer-dvb-s2-043876028d0d3cae66d35b96bcb62718199539cf.tar.gz
mediapointer-dvb-s2-043876028d0d3cae66d35b96bcb62718199539cf.tar.bz2
Fix cx88-blackbird null pointer
From: Jelle Foks <jelle@foks.8m.com> 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>
-rw-r--r--linux/drivers/media/video/cx88/cx88-blackbird.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/linux/drivers/media/video/cx88/cx88-blackbird.c b/linux/drivers/media/video/cx88/cx88-blackbird.c
index dc27d74eb..896beb7ed 100644
--- a/linux/drivers/media/video/cx88/cx88-blackbird.c
+++ b/linux/drivers/media/video/cx88/cx88-blackbird.c
@@ -975,9 +975,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;