summaryrefslogtreecommitdiff
path: root/drivers/usb/serial/pl2303.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/serial/pl2303.c')
-rw-r--r--drivers/usb/serial/pl2303.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/usb/serial/pl2303.c b/drivers/usb/serial/pl2303.c
index 37c81c08faad..cf2213bae0e0 100644
--- a/drivers/usb/serial/pl2303.c
+++ b/drivers/usb/serial/pl2303.c
@@ -218,10 +218,9 @@ static int pl2303_startup (struct usb_serial *serial)
dbg("device type: %d", type);
for (i = 0; i < serial->num_ports; ++i) {
- priv = kmalloc (sizeof (struct pl2303_private), GFP_KERNEL);
+ priv = kzalloc(sizeof(struct pl2303_private), GFP_KERNEL);
if (!priv)
goto cleanup;
- memset (priv, 0x00, sizeof (struct pl2303_private));
spin_lock_init(&priv->lock);
priv->buf = pl2303_buf_alloc(PL2303_BUF_SIZE);
if (priv->buf == NULL) {
@@ -383,12 +382,11 @@ static void pl2303_set_termios (struct usb_serial_port *port, struct termios *ol
}
}
- buf = kmalloc (7, GFP_KERNEL);
+ buf = kzalloc (7, GFP_KERNEL);
if (!buf) {
dev_err(&port->dev, "%s - out of memory.\n", __FUNCTION__);
return;
}
- memset (buf, 0x00, 0x07);
i = usb_control_msg (serial->dev, usb_rcvctrlpipe (serial->dev, 0),
GET_LINE_REQUEST, GET_LINE_REQUEST_TYPE,