diff options
author | Alan Stern <stern@rowland.harvard.edu> | 2005-10-24 19:38:24 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2005-10-28 23:47:51 (GMT) |
commit | 0a1ef3b5a765a6f20e7b8caf295aad3276243966 (patch) | |
tree | 31d2bc231306e3ed6ed81512e460e32d00bfc730 /drivers/usb/core/hub.c | |
parent | b724ae77969fd832be71419dca74bece9af287ff (diff) | |
download | linux-fsl-qoriq-0a1ef3b5a765a6f20e7b8caf295aad3276243966.tar.xz |
[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/hub.c')
-rw-r--r-- | drivers/usb/core/hub.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c index 6a2ebd8..8ba5854 100644 --- a/drivers/usb/core/hub.c +++ b/drivers/usb/core/hub.c @@ -865,14 +865,12 @@ descriptor_error: /* We found a hub */ dev_info (&intf->dev, "USB hub found\n"); - hub = kmalloc(sizeof(*hub), GFP_KERNEL); + hub = kzalloc(sizeof(*hub), GFP_KERNEL); if (!hub) { dev_dbg (&intf->dev, "couldn't kmalloc hub struct\n"); return -ENOMEM; } - memset(hub, 0, sizeof(*hub)); - INIT_LIST_HEAD(&hub->event_list); hub->intfdev = &intf->dev; hub->hdev = hdev; |