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/console.c | |
parent | afd21ee5abd0fef567dbfa234099304886ff83ce (diff) | |
download | talos-obmc-linux-7ac9da10af7ffd94cfd07e097b93d588bbd32b75.tar.gz talos-obmc-linux-7ac9da10af7ffd94cfd07e097b93d588bbd32b75.zip |
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/console.c')
-rw-r--r-- | drivers/usb/serial/console.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/usb/serial/console.c b/drivers/usb/serial/console.c index 3a9073dbfe6a..7167728d764c 100644 --- a/drivers/usb/serial/console.c +++ b/drivers/usb/serial/console.c @@ -166,19 +166,17 @@ static int usb_console_setup(struct console *co, char *options) if (serial->type->set_termios) { /* build up a fake tty structure so that the open call has something * to look at to get the cflag value */ - tty = kmalloc (sizeof (*tty), GFP_KERNEL); + tty = kzalloc(sizeof(*tty), GFP_KERNEL); if (!tty) { err ("no more memory"); return -ENOMEM; } - termios = kmalloc (sizeof (*termios), GFP_KERNEL); + termios = kzalloc(sizeof(*termios), GFP_KERNEL); if (!termios) { err ("no more memory"); kfree (tty); return -ENOMEM; } - memset (tty, 0x00, sizeof(*tty)); - memset (termios, 0x00, sizeof(*termios)); termios->c_cflag = cflag; tty->termios = termios; port->tty = tty; |