[PATCH] USB: vicam.c: fix a NULL pointer dereference
authorAdrian Bunk <bunk@stusta.de>
Fri, 10 Mar 2006 22:25:06 +0000 (23:25 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 20 Mar 2006 22:50:02 +0000 (14:50 -0800)
This patch fixes a NULL pointer dereference spotted by the Coverity
checker.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/media/vicam.c

index 8cfc47b..1d06e53 100644 (file)
@@ -764,6 +764,7 @@ vicam_open(struct inode *inode, struct file *file)
        if (!cam) {
                printk(KERN_ERR
                       "vicam video_device improperly initialized");
+               return -EINVAL;
        }
 
        /* the videodev_lock held above us protects us from