Skip to contentSkip to conversation

scsi: aic94xx: Use dma_pool_zalloc()

PATCH New Souptick Joarder 1 participant 1 message Feb 15, 2018 SCSI

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 scsi: aic94xx: Use dma_pool_zalloc()

Use dma_pool_zalloc() instead of dma_pool_alloc + memset

---
 drivers/scsi/aic94xx/aic94xx_hwi.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/scsi/aic94xx/aic94xx_hwi.c +1 -2
index 2dbc833..1b13133 100644
@@ -1055,14 +1055,13 @@ static struct asd_ascb *asd_ascb_alloc(struct asd_ha_struct *asd_ha,
 
 	if (ascb) {
 		ascb->dma_scb.size = sizeof(struct scb);
-		ascb->dma_scb.vaddr = dma_pool_alloc(asd_ha->scb_pool,
+		ascb->dma_scb.vaddr = dma_pool_zalloc(asd_ha->scb_pool,
 						     gfp_flags,
 						    &ascb->dma_scb.dma_handle);
 		if (!ascb->dma_scb.vaddr) {
 			kmem_cache_free(asd_ascb_cache, ascb);
 			return NULL;
 		}
-		memset(ascb->dma_scb.vaddr, 0, sizeof(struct scb));
 		asd_init_ascb(asd_ha, ascb);
 
 		spin_lock_irqsave(&seq->tc_index_lock, flags);

--
1.9.1