aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/cpia_usb.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/video/cpia_usb.c')
-rw-r--r--drivers/media/video/cpia_usb.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/media/video/cpia_usb.c b/drivers/media/video/cpia_usb.c
index 1439cb752874..03275c37c5d3 100644
--- a/drivers/media/video/cpia_usb.c
+++ b/drivers/media/video/cpia_usb.c
@@ -499,14 +499,12 @@ static int cpia_probe(struct usb_interface *intf,
499 499
500 printk(KERN_INFO "USB CPiA camera found\n"); 500 printk(KERN_INFO "USB CPiA camera found\n");
501 501
502 ucpia = kmalloc(sizeof(*ucpia), GFP_KERNEL); 502 ucpia = kzalloc(sizeof(*ucpia), GFP_KERNEL);
503 if (!ucpia) { 503 if (!ucpia) {
504 printk(KERN_ERR "couldn't kmalloc cpia struct\n"); 504 printk(KERN_ERR "couldn't kmalloc cpia struct\n");
505 return -ENOMEM; 505 return -ENOMEM;
506 } 506 }
507 507
508 memset(ucpia, 0, sizeof(*ucpia));
509
510 ucpia->dev = udev; 508 ucpia->dev = udev;
511 ucpia->iface = interface->desc.bInterfaceNumber; 509 ucpia->iface = interface->desc.bInterfaceNumber;
512 init_waitqueue_head(&ucpia->wq_stream); 510 init_waitqueue_head(&ucpia->wq_stream);