[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

@ -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;