diff options
Diffstat (limited to 'drivers/net/irda')
-rw-r--r-- | drivers/net/irda/irport.c | 3 | ||||
-rw-r--r-- | drivers/net/irda/irtty-sir.c | 3 |
2 files changed, 2 insertions, 4 deletions
diff --git a/drivers/net/irda/irport.c b/drivers/net/irda/irport.c index 3078c419cb02..20732458f5ac 100644 --- a/drivers/net/irda/irport.c +++ b/drivers/net/irda/irport.c | |||
@@ -164,14 +164,13 @@ irport_open(int i, unsigned int iobase, unsigned int irq) | |||
164 | 164 | ||
165 | /* Allocate memory if needed */ | 165 | /* Allocate memory if needed */ |
166 | if (self->tx_buff.truesize > 0) { | 166 | if (self->tx_buff.truesize > 0) { |
167 | self->tx_buff.head = kmalloc(self->tx_buff.truesize, | 167 | self->tx_buff.head = kzalloc(self->tx_buff.truesize, |
168 | GFP_KERNEL); | 168 | GFP_KERNEL); |
169 | if (self->tx_buff.head == NULL) { | 169 | if (self->tx_buff.head == NULL) { |
170 | IRDA_ERROR("%s(), can't allocate memory for " | 170 | IRDA_ERROR("%s(), can't allocate memory for " |
171 | "transmit buffer!\n", __FUNCTION__); | 171 | "transmit buffer!\n", __FUNCTION__); |
172 | goto err_out4; | 172 | goto err_out4; |
173 | } | 173 | } |
174 | memset(self->tx_buff.head, 0, self->tx_buff.truesize); | ||
175 | } | 174 | } |
176 | self->tx_buff.data = self->tx_buff.head; | 175 | self->tx_buff.data = self->tx_buff.head; |
177 | 176 | ||
diff --git a/drivers/net/irda/irtty-sir.c b/drivers/net/irda/irtty-sir.c index ad1857364d51..6f5f697ec9f8 100644 --- a/drivers/net/irda/irtty-sir.c +++ b/drivers/net/irda/irtty-sir.c | |||
@@ -505,10 +505,9 @@ static int irtty_open(struct tty_struct *tty) | |||
505 | } | 505 | } |
506 | 506 | ||
507 | /* allocate private device info block */ | 507 | /* allocate private device info block */ |
508 | priv = kmalloc(sizeof(*priv), GFP_KERNEL); | 508 | priv = kzalloc(sizeof(*priv), GFP_KERNEL); |
509 | if (!priv) | 509 | if (!priv) |
510 | goto out_put; | 510 | goto out_put; |
511 | memset(priv, 0, sizeof(*priv)); | ||
512 | 511 | ||
513 | priv->magic = IRTTY_MAGIC; | 512 | priv->magic = IRTTY_MAGIC; |
514 | priv->tty = tty; | 513 | priv->tty = tty; |