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>
This commit is contained in:
Burman Yan
2006-11-22 20:54:38 +02:00
committed by Greg Kroah-Hartman
parent afd21ee5ab
commit 7ac9da10af
5 changed files with 6 additions and 12 deletions

View File

@@ -85,10 +85,9 @@ static int ark3116_attach(struct usb_serial *serial)
int i;
for (i = 0; i < serial->num_ports; ++i) {
priv = kmalloc(sizeof (struct ark3116_private), GFP_KERNEL);
priv = kzalloc(sizeof(struct ark3116_private), GFP_KERNEL);
if (!priv)
goto cleanup;
memset(priv, 0x00, sizeof (struct ark3116_private));
spin_lock_init(&priv->lock);
usb_set_serial_port_data(serial->port[i], priv);