diff options
author | Sabyasachi Gupta <sabyasachi.linux@gmail.com> | 2018-10-18 18:06:26 +0200 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2018-10-24 03:25:50 +0200 |
commit | 1b171b1a29d68bcad1e44b0135a5155570efa3ea (patch) | |
tree | 05480826fd2ce7a5b04d298eca6c1021cd8bd3e0 /drivers/scsi/mvsas | |
parent | scsi: target: Don't request modules that aren't even built (diff) | |
download | linux-1b171b1a29d68bcad1e44b0135a5155570efa3ea.tar.xz linux-1b171b1a29d68bcad1e44b0135a5155570efa3ea.zip |
scsi: mvsas: Use dma_pool_zalloc
Replace dma_pool_alloc + memset with dma_pool_zalloc.
Signed-off-by: Sabyasachi Gupta <sabyasachi.linux@gmail.com>
Reviewed-by: Jack Wang <jinpu.wang@profitbricks.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/mvsas')
-rw-r--r-- | drivers/scsi/mvsas/mv_sas.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/scsi/mvsas/mv_sas.c b/drivers/scsi/mvsas/mv_sas.c index 3df1428df317..4753b3c6a2c2 100644 --- a/drivers/scsi/mvsas/mv_sas.c +++ b/drivers/scsi/mvsas/mv_sas.c @@ -790,12 +790,11 @@ static int mvs_task_prep(struct sas_task *task, struct mvs_info *mvi, int is_tmf slot->n_elem = n_elem; slot->slot_tag = tag; - slot->buf = dma_pool_alloc(mvi->dma_pool, GFP_ATOMIC, &slot->buf_dma); + slot->buf = dma_pool_zalloc(mvi->dma_pool, GFP_ATOMIC, &slot->buf_dma); if (!slot->buf) { rc = -ENOMEM; goto err_out_tag; } - memset(slot->buf, 0, MVS_SLOT_BUF_SZ); tei.task = task; tei.hdr = &mvi->slot[tag]; |