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

Commit 94463a9c authored by Joe Perches's avatar Joe Perches Committed by Tejun Heo
Browse files

ata: 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 avatarTejun Heo <tj@kernel.org>
parent ebe06187
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -734,13 +734,12 @@ static int sata_fsl_port_start(struct ata_port *ap)
	if (!pp)
		return -ENOMEM;

	mem = dma_alloc_coherent(dev, SATA_FSL_PORT_PRIV_DMA_SZ, &mem_dma,
	mem = dma_zalloc_coherent(dev, SATA_FSL_PORT_PRIV_DMA_SZ, &mem_dma,
				  GFP_KERNEL);
	if (!mem) {
		kfree(pp);
		return -ENOMEM;
	}
	memset(mem, 0, SATA_FSL_PORT_PRIV_DMA_SZ);

	pp->cmdslot = mem;
	pp->cmdslot_paddr = mem_dma;