diff options
author | Alan Cox <alan@lxorguk.ukuu.org.uk> | 2006-09-29 02:00:40 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-09-29 09:18:16 -0700 |
commit | 1266b1e1aed0a4d7d5cb569deca8c31cba34a990 (patch) | |
tree | 068b6914c89efd98fb75ff0eb3fa952ec92b56fa /drivers/char | |
parent | 0b4a8a789a328af6aac613734c362cf6aad72201 (diff) | |
download | kernel_samsung_aries-1266b1e1aed0a4d7d5cb569deca8c31cba34a990.zip kernel_samsung_aries-1266b1e1aed0a4d7d5cb569deca8c31cba34a990.tar.gz kernel_samsung_aries-1266b1e1aed0a4d7d5cb569deca8c31cba34a990.tar.bz2 |
[PATCH] tty: trivial kzalloc opportunity
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/char')
-rw-r--r-- | drivers/char/tty_io.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/drivers/char/tty_io.c b/drivers/char/tty_io.c index 2a1e95b..18085a2 100644 --- a/drivers/char/tty_io.c +++ b/drivers/char/tty_io.c @@ -160,17 +160,11 @@ static void release_mem(struct tty_struct *tty, int idx); * been initialized in any way but has been zeroed * * Locking: none - * FIXME: use kzalloc */ static struct tty_struct *alloc_tty_struct(void) { - struct tty_struct *tty; - - tty = kmalloc(sizeof(struct tty_struct), GFP_KERNEL); - if (tty) - memset(tty, 0, sizeof(struct tty_struct)); - return tty; + return kzalloc(sizeof(struct tty_struct), GFP_KERNEL); } static void tty_buffer_free_all(struct tty_struct *); |