aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/char/tty_io.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/drivers/char/tty_io.c b/drivers/char/tty_io.c
index 2a1e95b0f282..18085a20df23 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);
160 * been initialized in any way but has been zeroed 160 * been initialized in any way but has been zeroed
161 * 161 *
162 * Locking: none 162 * Locking: none
163 * FIXME: use kzalloc
164 */ 163 */
165 164
166static struct tty_struct *alloc_tty_struct(void) 165static struct tty_struct *alloc_tty_struct(void)
167{ 166{
168 struct tty_struct *tty; 167 return kzalloc(sizeof(struct tty_struct), GFP_KERNEL);
169
170 tty = kmalloc(sizeof(struct tty_struct), GFP_KERNEL);
171 if (tty)
172 memset(tty, 0, sizeof(struct tty_struct));
173 return tty;
174} 168}
175 169
176static void tty_buffer_free_all(struct tty_struct *); 170static void tty_buffer_free_all(struct tty_struct *);