[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
@@ -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;
|
||||
|
Reference in New Issue
Block a user