summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/sfc/siena/tx_common.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/ethernet/sfc/siena/tx_common.c')
-rw-r--r--drivers/net/ethernet/sfc/siena/tx_common.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/net/ethernet/sfc/siena/tx_common.c b/drivers/net/ethernet/sfc/siena/tx_common.c
index 71f9b5ec5ae4..bcdf8c561579 100644
--- a/drivers/net/ethernet/sfc/siena/tx_common.c
+++ b/drivers/net/ethernet/sfc/siena/tx_common.c
@@ -36,13 +36,12 @@ int efx_siena_probe_tx_queue(struct efx_tx_queue *tx_queue)
tx_queue->queue, efx->txq_entries, tx_queue->ptr_mask);
/* Allocate software ring */
- tx_queue->buffer = kcalloc(entries, sizeof(*tx_queue->buffer),
- GFP_KERNEL);
+ tx_queue->buffer = kzalloc_objs(*tx_queue->buffer, entries);
if (!tx_queue->buffer)
return -ENOMEM;
- tx_queue->cb_page = kcalloc(efx_tx_cb_page_count(tx_queue),
- sizeof(tx_queue->cb_page[0]), GFP_KERNEL);
+ tx_queue->cb_page = kzalloc_objs(tx_queue->cb_page[0],
+ efx_tx_cb_page_count(tx_queue));
if (!tx_queue->cb_page) {
rc = -ENOMEM;
goto fail1;