summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/jme.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/ethernet/jme.c')
-rw-r--r--drivers/net/ethernet/jme.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/net/ethernet/jme.c b/drivers/net/ethernet/jme.c
index 8a165842fa85..06ff185eb188 100644
--- a/drivers/net/ethernet/jme.c
+++ b/drivers/net/ethernet/jme.c
@@ -589,8 +589,9 @@ jme_setup_tx_resources(struct jme_adapter *jme)
atomic_set(&txring->next_to_clean, 0);
atomic_set(&txring->nr_free, jme->tx_ring_size);
- txring->bufinf = kzalloc(sizeof(struct jme_buffer_info) *
- jme->tx_ring_size, GFP_ATOMIC);
+ txring->bufinf = kcalloc(jme->tx_ring_size,
+ sizeof(struct jme_buffer_info),
+ GFP_ATOMIC);
if (unlikely(!(txring->bufinf)))
goto err_free_txring;
@@ -838,8 +839,9 @@ jme_setup_rx_resources(struct jme_adapter *jme)
rxring->next_to_use = 0;
atomic_set(&rxring->next_to_clean, 0);
- rxring->bufinf = kzalloc(sizeof(struct jme_buffer_info) *
- jme->rx_ring_size, GFP_ATOMIC);
+ rxring->bufinf = kcalloc(jme->rx_ring_size,
+ sizeof(struct jme_buffer_info),
+ GFP_ATOMIC);
if (unlikely(!(rxring->bufinf)))
goto err_free_rxring;