Hi,

another for kzalloc. Who's maintainer for this?

        Regards
                Oliver

Signed-off-by: Oliver Neukum <[EMAIL PROTECTED]>

--- linux-2.6.15-vanilla/drivers/usb/media/usbvideo.c   2006-01-03 
04:21:10.000000000 +0100
+++ linux-2.6.15/drivers/usb/media/usbvideo.c   2006-01-06 21:10:21.000000000 
+0100
@@ -690,14 +690,13 @@
        }
 
        base_size = num_cams * sizeof(struct uvd) + sizeof(struct usbvideo);
-       cams = (struct usbvideo *) kmalloc(base_size, GFP_KERNEL);
+       cams = (struct usbvideo *) kzalloc(base_size, GFP_KERNEL);
        if (cams == NULL) {
                err("Failed to allocate %d. bytes for usbvideo struct", 
base_size);
                return -ENOMEM;
        }
        dbg("%s: Allocated $%p (%d. bytes) for %d. cameras",
            __FUNCTION__, cams, base_size, num_cams);
-       memset(cams, 0, base_size);
 
        /* Copy callbacks, apply defaults for those that are not set */
        memmove(&cams->cb, cbTbl, sizeof(cams->cb));


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
linux-usb-devel@lists.sourceforge.net
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to