summaryrefslogtreecommitdiff
path: root/drivers/scsi/qla2xxx/qla_os.c
diff options
context:
space:
mode:
authorWang Qing <wangqing@vivo.com>2021-03-13 10:41:15 +0800
committerMartin K. Petersen <martin.petersen@oracle.com>2021-03-15 22:52:30 -0400
commit720efdd23f963612d0a8c7072293aff119c6f915 (patch)
tree6dd768eae036580378984969107c0ba4e564dd42 /drivers/scsi/qla2xxx/qla_os.c
parent475bff65c431013057c4b6b150bce259e80d0adf (diff)
scsi: qla2xxx: Use dma_pool_zalloc()
Use dma_pool_zalloc() instead of dma_pool_alloc() and memset(). Link: https://lore.kernel.org/r/1615603275-14303-1-git-send-email-wangqing@vivo.com Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com> Signed-off-by: Wang Qing <wangqing@vivo.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/qla2xxx/qla_os.c')
-rw-r--r--drivers/scsi/qla2xxx/qla_os.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c
index 074392560f3d..ac5e9548b757 100644
--- a/drivers/scsi/qla2xxx/qla_os.c
+++ b/drivers/scsi/qla2xxx/qla_os.c
@@ -4238,11 +4238,10 @@ qla2x00_mem_alloc(struct qla_hw_data *ha, uint16_t req_len, uint16_t rsp_len,
/* Get consistent memory allocated for Special Features-CB. */
if (IS_QLA27XX(ha) || IS_QLA28XX(ha)) {
- ha->sf_init_cb = dma_pool_alloc(ha->s_dma_pool, GFP_KERNEL,
+ ha->sf_init_cb = dma_pool_zalloc(ha->s_dma_pool, GFP_KERNEL,
&ha->sf_init_cb_dma);
if (!ha->sf_init_cb)
goto fail_sf_init_cb;
- memset(ha->sf_init_cb, 0, sizeof(struct init_sf_cb));
ql_dbg_pci(ql_dbg_init, ha->pdev, 0x0199,
"sf_init_cb=%p.\n", ha->sf_init_cb);
}