aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/serial/cypress_m8.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/serial/cypress_m8.c')
-rw-r--r--drivers/usb/serial/cypress_m8.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/usb/serial/cypress_m8.c b/drivers/usb/serial/cypress_m8.c
index 68067fe117a4..71af3bf5adb7 100644
--- a/drivers/usb/serial/cypress_m8.c
+++ b/drivers/usb/serial/cypress_m8.c
@@ -435,11 +435,10 @@ static int generic_startup (struct usb_serial *serial)
435 435
436 dbg("%s - port %d", __FUNCTION__, serial->port[0]->number); 436 dbg("%s - port %d", __FUNCTION__, serial->port[0]->number);
437 437
438 priv = kmalloc(sizeof (struct cypress_private), GFP_KERNEL); 438 priv = kzalloc(sizeof (struct cypress_private), GFP_KERNEL);
439 if (!priv) 439 if (!priv)
440 return -ENOMEM; 440 return -ENOMEM;
441 441
442 memset(priv, 0x00, sizeof (struct cypress_private));
443 spin_lock_init(&priv->lock); 442 spin_lock_init(&priv->lock);
444 priv->buf = cypress_buf_alloc(CYPRESS_BUF_SIZE); 443 priv->buf = cypress_buf_alloc(CYPRESS_BUF_SIZE);
445 if (priv->buf == NULL) { 444 if (priv->buf == NULL) {