diff options
Diffstat (limited to 'net/irda/ircomm/ircomm_tty.c')
-rw-r--r-- | net/irda/ircomm/ircomm_tty.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/net/irda/ircomm/ircomm_tty.c b/net/irda/ircomm/ircomm_tty.c index cde3b84d4a0e..3bcdb467efc5 100644 --- a/net/irda/ircomm/ircomm_tty.c +++ b/net/irda/ircomm/ircomm_tty.c | |||
@@ -379,12 +379,11 @@ static int ircomm_tty_open(struct tty_struct *tty, struct file *filp) | |||
379 | self = hashbin_lock_find(ircomm_tty, line, NULL); | 379 | self = hashbin_lock_find(ircomm_tty, line, NULL); |
380 | if (!self) { | 380 | if (!self) { |
381 | /* No, so make new instance */ | 381 | /* No, so make new instance */ |
382 | self = kmalloc(sizeof(struct ircomm_tty_cb), GFP_KERNEL); | 382 | self = kzalloc(sizeof(struct ircomm_tty_cb), GFP_KERNEL); |
383 | if (self == NULL) { | 383 | if (self == NULL) { |
384 | IRDA_ERROR("%s(), kmalloc failed!\n", __FUNCTION__); | 384 | IRDA_ERROR("%s(), kmalloc failed!\n", __FUNCTION__); |
385 | return -ENOMEM; | 385 | return -ENOMEM; |
386 | } | 386 | } |
387 | memset(self, 0, sizeof(struct ircomm_tty_cb)); | ||
388 | 387 | ||
389 | self->magic = IRCOMM_TTY_MAGIC; | 388 | self->magic = IRCOMM_TTY_MAGIC; |
390 | self->flow = FLOW_STOP; | 389 | self->flow = FLOW_STOP; |