[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
@ -744,10 +744,9 @@ struct usb_bus *usb_alloc_bus (struct usb_operations *op)
|
||||
{
|
||||
struct usb_bus *bus;
|
||||
|
||||
bus = kmalloc (sizeof *bus, GFP_KERNEL);
|
||||
bus = kzalloc (sizeof *bus, GFP_KERNEL);
|
||||
if (!bus)
|
||||
return NULL;
|
||||
memset(bus, 0, sizeof(struct usb_bus));
|
||||
usb_bus_init (bus);
|
||||
bus->op = op;
|
||||
return bus;
|
||||
|
Reference in New Issue
Block a user