[PATCH] usbcore: Use kzalloc instead of kmalloc/memset

This patch (as590) fixes up all the remaining places where usbcore can
use kzalloc rather than kmalloc/memset.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
Alan Stern
2005-10-24 15:38:24 -04:00
committed by Greg Kroah-Hartman
parent b724ae7796
commit 0a1ef3b5a7
6 changed files with 10 additions and 20 deletions

View File

@ -210,10 +210,10 @@ err:
static struct async *alloc_async(unsigned int numisoframes)
{
unsigned int assize = sizeof(struct async) + numisoframes * sizeof(struct usb_iso_packet_descriptor);
struct async *as = kmalloc(assize, GFP_KERNEL);
struct async *as = kzalloc(assize, GFP_KERNEL);
if (!as)
return NULL;
memset(as, 0, assize);
as->urb = usb_alloc_urb(numisoframes, GFP_KERNEL);
if (!as->urb) {
kfree(as);