[PATCH] USB: kzalloc in dabusb
authorOliver Neukum <oliver@neukum.org>
Fri, 6 Jan 2006 20:01:47 +0000 (21:01 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 20 Mar 2006 22:49:53 +0000 (14:49 -0800)
kzalloc in dabusb.

Signed-off-by: Oliver Neukum <oliver@neukum.name>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/media/dabusb.c

index 18d8eaf408d502224a00b37599b6dba5e335a58d..6f560fe9a519133e5feae73f80ea7b34dc5fd70b 100644 (file)
@@ -217,12 +217,11 @@ static int dabusb_alloc_buffers (pdabusb_t s)
                 pipesize, packets, transfer_buffer_length);
 
        while (buffers < (s->total_buffer_size << 10)) {
-               b = (pbuff_t) kmalloc (sizeof (buff_t), GFP_KERNEL);
+               b = (pbuff_t) kzalloc (sizeof (buff_t), GFP_KERNEL);
                if (!b) {
-                       err("kmalloc(sizeof(buff_t))==NULL");
+                       err("kzalloc(sizeof(buff_t))==NULL");
                        goto err;
                }
-               memset (b, 0, sizeof (buff_t));
                b->s = s;
                b->purb = usb_alloc_urb(packets, GFP_KERNEL);
                if (!b->purb) {