dma_alloc_coherent() already takes care to zero the memory, so there's no need to zero it explicitly. Signed-off-by: Ahmad Fatoum <a.fatoum@xxxxxxxxxxxxxx> --- drivers/net/fsl-fman.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/drivers/net/fsl-fman.c b/drivers/net/fsl-fman.c index bdb23598153f..5528ecccc950 100644 --- a/drivers/net/fsl-fman.c +++ b/drivers/net/fsl-fman.c @@ -613,13 +613,10 @@ static int fm_eth_rx_port_parameter_init(struct fm_eth *fm_eth) rx_bd_ring_base = dma_alloc_coherent(sizeof(struct fm_port_bd) * RX_BD_RING_SIZE, DMA_ADDRESS_BROKEN); if (!rx_bd_ring_base) return -ENOMEM; - memset(rx_bd_ring_base, 0, sizeof(struct fm_port_bd) - * RX_BD_RING_SIZE); - /* alloc Rx buffer from main memory */ rx_buf_pool = dma_zalloc(MAX_RXBUF_LEN * RX_BD_RING_SIZE); /* save them to fm_eth */ fm_eth->rx_bd_ring = rx_bd_ring_base; @@ -694,12 +691,10 @@ static int fm_eth_tx_port_parameter_init(struct fm_eth *fm_eth) tx_bd_ring_base = dma_alloc_coherent(sizeof(struct fm_port_bd) * TX_BD_RING_SIZE, DMA_ADDRESS_BROKEN); if (!tx_bd_ring_base) return -ENOMEM; - memset(tx_bd_ring_base, 0, sizeof(struct fm_port_bd) - * TX_BD_RING_SIZE); /* save it to fm_eth */ fm_eth->tx_bd_ring = tx_bd_ring_base; fm_eth->cur_txbd_idx = 0; /* init Tx BDs ring */ -- 2.39.2