diff options
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 6a2ebd89916f..8ba5854e5387 100644 --- a/drivers/usb/core/hub.c +++ b/drivers/usb/core/hub.c | |||
@@ -865,14 +865,12 @@ descriptor_error: | |||
865 | /* We found a hub */ | 865 | /* We found a hub */ |
866 | dev_info (&intf->dev, "USB hub found\n"); | 866 | dev_info (&intf->dev, "USB hub found\n"); |
867 | 867 | ||
868 | hub = kmalloc(sizeof(*hub), GFP_KERNEL); | 868 | hub = kzalloc(sizeof(*hub), GFP_KERNEL); |
869 | if (!hub) { | 869 | if (!hub) { |
870 | dev_dbg (&intf->dev, "couldn't kmalloc hub struct\n"); | 870 | dev_dbg (&intf->dev, "couldn't kmalloc hub struct\n"); |
871 | return -ENOMEM; | 871 | return -ENOMEM; |
872 | } | 872 | } |
873 | 873 | ||
874 | memset(hub, 0, sizeof(*hub)); | ||
875 | |||
876 | INIT_LIST_HEAD(&hub->event_list); | 874 | INIT_LIST_HEAD(&hub->event_list); |
877 | hub->intfdev = &intf->dev; | 875 | hub->intfdev = &intf->dev; |
878 | hub->hdev = hdev; | 876 | hub->hdev = hdev; |