Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit df6e6333 authored by Joe Perches's avatar Joe Perches Committed by John W. Linville
Browse files

rt2x00: Use dma_zalloc_coherent



Use the zeroing function instead of dma_alloc_coherent & memset(,0,)

Signed-off-by: default avatarJoe Perches <joe@perches.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent a4068323
Loading
Loading
Loading
Loading
+3 −5
Original line number Diff line number Diff line
@@ -119,14 +119,12 @@ static int rt2x00mmio_alloc_queue_dma(struct rt2x00_dev *rt2x00dev,
	/*
	 * Allocate DMA memory for descriptor and buffer.
	 */
	addr = dma_alloc_coherent(rt2x00dev->dev,
				  queue->limit * queue->desc_size,
				  &dma, GFP_KERNEL);
	addr = dma_zalloc_coherent(rt2x00dev->dev,
				   queue->limit * queue->desc_size, &dma,
				   GFP_KERNEL);
	if (!addr)
		return -ENOMEM;

	memset(addr, 0, queue->limit * queue->desc_size);

	/*
	 * Initialize all queue entries to contain valid addresses.
	 */