aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/serial/ti_usb_3410_5052.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/serial/ti_usb_3410_5052.c')
-rw-r--r--drivers/usb/serial/ti_usb_3410_5052.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/usb/serial/ti_usb_3410_5052.c b/drivers/usb/serial/ti_usb_3410_5052.c
index c18db325707..c3a2071b802 100644
--- a/drivers/usb/serial/ti_usb_3410_5052.c
+++ b/drivers/usb/serial/ti_usb_3410_5052.c
@@ -416,12 +416,11 @@ static int ti_startup(struct usb_serial *serial)
416 dev->actconfig->desc.bConfigurationValue); 416 dev->actconfig->desc.bConfigurationValue);
417 417
418 /* create device structure */ 418 /* create device structure */
419 tdev = kmalloc(sizeof(struct ti_device), GFP_KERNEL); 419 tdev = kzalloc(sizeof(struct ti_device), GFP_KERNEL);
420 if (tdev == NULL) { 420 if (tdev == NULL) {
421 dev_err(&dev->dev, "%s - out of memory\n", __FUNCTION__); 421 dev_err(&dev->dev, "%s - out of memory\n", __FUNCTION__);
422 return -ENOMEM; 422 return -ENOMEM;
423 } 423 }
424 memset(tdev, 0, sizeof(struct ti_device));
425 sema_init(&tdev->td_open_close_sem, 1); 424 sema_init(&tdev->td_open_close_sem, 1);
426 tdev->td_serial = serial; 425 tdev->td_serial = serial;
427 usb_set_serial_data(serial, tdev); 426 usb_set_serial_data(serial, tdev);