aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/irda/nsc-ircc.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/irda/nsc-ircc.c')
-rw-r--r--drivers/net/irda/nsc-ircc.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/net/irda/nsc-ircc.c b/drivers/net/irda/nsc-ircc.c
index 2a4f2f153244..9cf836b57c49 100644
--- a/drivers/net/irda/nsc-ircc.c
+++ b/drivers/net/irda/nsc-ircc.c
@@ -431,22 +431,20 @@ static int __init nsc_ircc_open(chipio_t *info)
431 /* Allocate memory if needed */ 431 /* Allocate memory if needed */
432 self->rx_buff.head = 432 self->rx_buff.head =
433 dma_alloc_coherent(NULL, self->rx_buff.truesize, 433 dma_alloc_coherent(NULL, self->rx_buff.truesize,
434 &self->rx_buff_dma, GFP_KERNEL); 434 &self->rx_buff_dma, GFP_KERNEL | __GFP_ZERO);
435 if (self->rx_buff.head == NULL) { 435 if (self->rx_buff.head == NULL) {
436 err = -ENOMEM; 436 err = -ENOMEM;
437 goto out2; 437 goto out2;
438 438
439 } 439 }
440 memset(self->rx_buff.head, 0, self->rx_buff.truesize);
441 440
442 self->tx_buff.head = 441 self->tx_buff.head =
443 dma_alloc_coherent(NULL, self->tx_buff.truesize, 442 dma_alloc_coherent(NULL, self->tx_buff.truesize,
444 &self->tx_buff_dma, GFP_KERNEL); 443 &self->tx_buff_dma, GFP_KERNEL | __GFP_ZERO);
445 if (self->tx_buff.head == NULL) { 444 if (self->tx_buff.head == NULL) {
446 err = -ENOMEM; 445 err = -ENOMEM;
447 goto out3; 446 goto out3;
448 } 447 }
449 memset(self->tx_buff.head, 0, self->tx_buff.truesize);
450 448
451 self->rx_buff.in_frame = FALSE; 449 self->rx_buff.in_frame = FALSE;
452 self->rx_buff.state = OUTSIDE_FRAME; 450 self->rx_buff.state = OUTSIDE_FRAME;