diff options
Diffstat (limited to 'drivers/usb/gadget/serial.c')
-rw-r--r-- | drivers/usb/gadget/serial.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/usb/gadget/serial.c b/drivers/usb/gadget/serial.c index dd33ff0ae4ce..38138bb9ddb0 100644 --- a/drivers/usb/gadget/serial.c +++ b/drivers/usb/gadget/serial.c | |||
@@ -1427,7 +1427,7 @@ static int __init gs_bind(struct usb_gadget *gadget) | |||
1427 | gs_acm_config_desc.bmAttributes |= USB_CONFIG_ATT_WAKEUP; | 1427 | gs_acm_config_desc.bmAttributes |= USB_CONFIG_ATT_WAKEUP; |
1428 | } | 1428 | } |
1429 | 1429 | ||
1430 | gs_device = dev = kmalloc(sizeof(struct gs_dev), GFP_KERNEL); | 1430 | gs_device = dev = kzalloc(sizeof(struct gs_dev), GFP_KERNEL); |
1431 | if (dev == NULL) | 1431 | if (dev == NULL) |
1432 | return -ENOMEM; | 1432 | return -ENOMEM; |
1433 | 1433 | ||
@@ -1435,7 +1435,6 @@ static int __init gs_bind(struct usb_gadget *gadget) | |||
1435 | init_utsname()->sysname, init_utsname()->release, | 1435 | init_utsname()->sysname, init_utsname()->release, |
1436 | gadget->name); | 1436 | gadget->name); |
1437 | 1437 | ||
1438 | memset(dev, 0, sizeof(struct gs_dev)); | ||
1439 | dev->dev_gadget = gadget; | 1438 | dev->dev_gadget = gadget; |
1440 | spin_lock_init(&dev->dev_lock); | 1439 | spin_lock_init(&dev->dev_lock); |
1441 | INIT_LIST_HEAD(&dev->dev_req_list); | 1440 | INIT_LIST_HEAD(&dev->dev_req_list); |