Explorar o código

[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 <bunk@stusta.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Adrian Bunk %!s(int64=19) %!d(string=hai) anos
pai
achega
f88f8295d8
Modificáronse 1 ficheiros con 1 adicións e 0 borrados
  1. 1 0
      drivers/usb/media/vicam.c

+ 1 - 0
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