summaryrefslogtreecommitdiff
path: root/drivers/ata
diff options
context:
space:
mode:
authorHarman Kalra <harman4linux@gmail.com>2016-09-20 22:44:40 +0300
committerTejun Heo <tj@kernel.org>2016-09-20 23:07:16 +0300
commit6ec76070f17993aa9ac0344330b971783d10c9c2 (patch)
treeded77f08641ca80c4adc63f87477b201d0a7febc /drivers/ata
parent0ce1b18c42a5b1613ad84d3bf93ee4f5bb3f8b33 (diff)
downloadlinux-6ec76070f17993aa9ac0344330b971783d10c9c2.tar.xz
ata: sata_mv: Replacing dma_pool_alloc and memset with a single call dma_pool_zalloc.
Replacing dma_pool_alloc and memset with a single call to dma_pool_zalloc Signed-off-by: Harman Kalra <harman4linux@gmail.com> Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'drivers/ata')
-rw-r--r--drivers/ata/sata_mv.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/ata/sata_mv.c b/drivers/ata/sata_mv.c
index 745489a1c86a..efc48bf89d51 100644
--- a/drivers/ata/sata_mv.c
+++ b/drivers/ata/sata_mv.c
@@ -1727,15 +1727,13 @@ static int mv_port_start(struct ata_port *ap)
return -ENOMEM;
ap->private_data = pp;
- pp->crqb = dma_pool_alloc(hpriv->crqb_pool, GFP_KERNEL, &pp->crqb_dma);
+ pp->crqb = dma_pool_zalloc(hpriv->crqb_pool, GFP_KERNEL, &pp->crqb_dma);
if (!pp->crqb)
return -ENOMEM;
- memset(pp->crqb, 0, MV_CRQB_Q_SZ);
- pp->crpb = dma_pool_alloc(hpriv->crpb_pool, GFP_KERNEL, &pp->crpb_dma);
+ pp->crpb = dma_pool_zalloc(hpriv->crpb_pool, GFP_KERNEL, &pp->crpb_dma);
if (!pp->crpb)
goto out_port_free_dma_mem;
- memset(pp->crpb, 0, MV_CRPB_Q_SZ);
/* 6041/6081 Rev. "C0" (and newer) are okay with async notify */
if (hpriv->hp_flags & MV_HP_ERRATA_60X1C0)