From: Adrian Bunk Date: Fri, 10 Mar 2006 22:25:06 +0000 (+0100) Subject: [PATCH] USB: vicam.c: fix a NULL pointer dereference X-Git-Tag: v2.6.17-rc1~1176^2~7 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=f88f8295d8a9229fc8b647baf4f15959384d7bb7;p=linux-2.6-omap-h63xx.git [PATCH] USB: vicam.c: fix a NULL pointer dereference This patch fixes a NULL pointer dereference spotted by the Coverity checker. Signed-off-by: Adrian Bunk Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/usb/media/vicam.c b/drivers/usb/media/vicam.c index 8cfc47b831f..1d06e53ec7c 100644 --- a/drivers/usb/media/vicam.c +++ b/drivers/usb/media/vicam.c @@ -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