git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fedora core 6 1.2949 + vserver 2.2.0
[linux-2.6.git]
/
drivers
/
usb
/
serial
/
console.c
diff --git
a/drivers/usb/serial/console.c
b/drivers/usb/serial/console.c
index
3a9073d
..
9386e21
100644
(file)
--- a/
drivers/usb/serial/console.c
+++ b/
drivers/usb/serial/console.c
@@
-65,7
+65,7
@@
static int usb_console_setup(struct console *co, char *options)
struct usb_serial_port *port;
int retval = 0;
struct tty_struct *tty;
struct usb_serial_port *port;
int retval = 0;
struct tty_struct *tty;
- struct termios *termios;
+ struct
k
termios *termios;
dbg ("%s", __FUNCTION__);
dbg ("%s", __FUNCTION__);
@@
-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 */
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 = k
malloc (sizeof
(*tty), GFP_KERNEL);
+ tty = k
zalloc(sizeof
(*tty), GFP_KERNEL);
if (!tty) {
err ("no more memory");
return -ENOMEM;
}
if (!tty) {
err ("no more memory");
return -ENOMEM;
}
- termios = k
malloc (sizeof
(*termios), GFP_KERNEL);
+ termios = k
zalloc(sizeof
(*termios), GFP_KERNEL);
if (!termios) {
err ("no more memory");
kfree (tty);
return -ENOMEM;
}
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;
termios->c_cflag = cflag;
tty->termios = termios;
port->tty = tty;