diff options
Diffstat (limited to 'drivers/net/niu.c')
-rw-r--r-- | drivers/net/niu.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/niu.c b/drivers/net/niu.c index bc695d53cdcc..b4cc61f1fc59 100644 --- a/drivers/net/niu.c +++ b/drivers/net/niu.c | |||
@@ -4504,7 +4504,7 @@ static int niu_alloc_channels(struct niu *np) | |||
4504 | 4504 | ||
4505 | np->dev->real_num_tx_queues = np->num_tx_rings; | 4505 | np->dev->real_num_tx_queues = np->num_tx_rings; |
4506 | 4506 | ||
4507 | np->rx_rings = kzalloc(np->num_rx_rings * sizeof(struct rx_ring_info), | 4507 | np->rx_rings = kcalloc(np->num_rx_rings, sizeof(struct rx_ring_info), |
4508 | GFP_KERNEL); | 4508 | GFP_KERNEL); |
4509 | err = -ENOMEM; | 4509 | err = -ENOMEM; |
4510 | if (!np->rx_rings) | 4510 | if (!np->rx_rings) |
@@ -4538,7 +4538,7 @@ static int niu_alloc_channels(struct niu *np) | |||
4538 | return err; | 4538 | return err; |
4539 | } | 4539 | } |
4540 | 4540 | ||
4541 | np->tx_rings = kzalloc(np->num_tx_rings * sizeof(struct tx_ring_info), | 4541 | np->tx_rings = kcalloc(np->num_tx_rings, sizeof(struct tx_ring_info), |
4542 | GFP_KERNEL); | 4542 | GFP_KERNEL); |
4543 | err = -ENOMEM; | 4543 | err = -ENOMEM; |
4544 | if (!np->tx_rings) | 4544 | if (!np->tx_rings) |