[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:
committed by
Greg Kroah-Hartman
parent
b724ae7796
commit
0a1ef3b5a7
@ -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);
|
||||
|
Reference in New Issue
Block a user