]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/media/video/bt8xx/bttv-driver.c
V4L/DVB (8955): bttv: Prevent NULL pointer dereference in radio_open
[linux-2.6-omap-h63xx.git] / drivers / media / video / bt8xx / bttv-driver.c
index 85bf31ab8789db097df2f29b0aaf77f8578b86f8..933eaef41eadd4b3be9e404924d22fb316c1bd70 100644 (file)
@@ -96,7 +96,6 @@ static unsigned int irq_iswitch;
 static unsigned int uv_ratio    = 50;
 static unsigned int full_luma_range;
 static unsigned int coring;
-extern int no_overlay;
 
 /* API features (turn on/off stuff for testing) */
 static unsigned int v4l2        = 1;
@@ -3432,7 +3431,7 @@ static int radio_open(struct inode *inode, struct file *file)
        dprintk("bttv: open minor=%d\n",minor);
 
        for (i = 0; i < bttv_num; i++) {
-               if (bttvs[i].radio_dev->minor == minor) {
+               if (bttvs[i].radio_dev && bttvs[i].radio_dev->minor == minor) {
                        btv = &bttvs[i];
                        break;
                }