Commit af996031 authored by Jason Wang's avatar Jason Wang Committed by David S. Miller

net: ixp4xx_hss: use dma_pool_zalloc

The dma_pool_zalloc combines dma_pool_alloc/memset. Therefore, the
dma_pool_alloc/memset can be replaced with dma_pool_zalloc which is
more compact.
Signed-off-by: default avatarJason Wang <wangborong@cdjrlc.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 9d32e4e7
......@@ -975,11 +975,10 @@ static int init_hdlc_queues(struct port *port)
return -ENOMEM;
}
port->desc_tab = dma_pool_alloc(dma_pool, GFP_KERNEL,
port->desc_tab = dma_pool_zalloc(dma_pool, GFP_KERNEL,
&port->desc_tab_phys);
if (!port->desc_tab)
return -ENOMEM;
memset(port->desc_tab, 0, POOL_ALLOC_SIZE);
memset(port->rx_buff_tab, 0, sizeof(port->rx_buff_tab)); /* tables */
memset(port->tx_buff_tab, 0, sizeof(port->tx_buff_tab));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment