diff options
author | Alan Stern <stern@rowland.harvard.edu> | 2005-10-24 15:38:24 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2005-10-28 16:47:51 -0700 |
commit | 0a1ef3b5a765a6f20e7b8caf295aad3276243966 (patch) | |
tree | 31d2bc231306e3ed6ed81512e460e32d00bfc730 /drivers/usb/core/usb.c | |
parent | b724ae77969fd832be71419dca74bece9af287ff (diff) | |
download | op-kernel-dev-0a1ef3b5a765a6f20e7b8caf295aad3276243966.zip op-kernel-dev-0a1ef3b5a765a6f20e7b8caf295aad3276243966.tar.gz |
[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>
Diffstat (limited to 'drivers/usb/core/usb.c')
-rw-r--r-- | drivers/usb/core/usb.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/usb/core/usb.c b/drivers/usb/core/usb.c index 4eca490..0eefff7 100644 --- a/drivers/usb/core/usb.c +++ b/drivers/usb/core/usb.c @@ -704,12 +704,10 @@ usb_alloc_dev(struct usb_device *parent, struct usb_bus *bus, unsigned port1) { struct usb_device *dev; - dev = kmalloc(sizeof(*dev), GFP_KERNEL); + dev = kzalloc(sizeof(*dev), GFP_KERNEL); if (!dev) return NULL; - memset(dev, 0, sizeof(*dev)); - bus = usb_bus_get(bus); if (!bus) { kfree(dev); |