diff options
author | Burman Yan <yan_952@hotmail.com> | 2006-11-22 20:54:38 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2006-12-01 14:25:51 -0800 |
commit | 7ac9da10af7ffd94cfd07e097b93d588bbd32b75 (patch) | |
tree | 335f931bb41e09ed9fff8c6bc4942f564c6a9ef3 /drivers/usb/serial/ti_usb_3410_5052.c | |
parent | afd21ee5abd0fef567dbfa234099304886ff83ce (diff) |
USB serial: replace kmalloc+memset with kzalloc
Replace kmalloc+memset with kzalloc
Signed-off-by: Yan Burman <yan_952@hotmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/serial/ti_usb_3410_5052.c')
-rw-r--r-- | drivers/usb/serial/ti_usb_3410_5052.c | 3 |
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 bbbb993447b9..ae98d8cbdbb8 100644 --- a/drivers/usb/serial/ti_usb_3410_5052.c +++ b/drivers/usb/serial/ti_usb_3410_5052.c @@ -461,13 +461,12 @@ static int ti_startup(struct usb_serial *serial) /* set up port structures */ for (i = 0; i < serial->num_ports; ++i) { - tport = kmalloc(sizeof(struct ti_port), GFP_KERNEL); + tport = kzalloc(sizeof(struct ti_port), GFP_KERNEL); if (tport == NULL) { dev_err(&dev->dev, "%s - out of memory\n", __FUNCTION__); status = -ENOMEM; goto free_tports; } - memset(tport, 0, sizeof(struct ti_port)); spin_lock_init(&tport->tp_lock); tport->tp_uart_base_addr = (i == 0 ? TI_UART1_BASE_ADDR : TI_UART2_BASE_ADDR); tport->tp_flags = low_latency ? ASYNC_LOW_LATENCY : 0; |