diff options
author | Souptick Joarder | 2018-02-15 01:40:38 +0530 |
---|---|---|
committer | Martin K. Petersen | 2018-02-22 20:28:43 -0500 |
commit | 501017f6d4e1feaa9ce3ff49c1190bc0588b3f02 (patch) | |
tree | 9cfae81c45387fef934afbf3369a01a16f20ffb5 /drivers/scsi/qla2xxx/qla_bsg.c | |
parent | 8d35a9dc42448c4f3cd208f8f4d5c5e72af83309 (diff) |
scsi: qla2xxx: Use dma_pool_zalloc()
Use dma_pool_zalloc() instead of dma_pool_alloc + memset
Signed-off-by: Souptick Joarder <jrdr.linux@gmail.com>
Acked-by: Himanshu Madhani <himanshu.madhani@cavium.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/qla2xxx/qla_bsg.c')
-rw-r--r-- | drivers/scsi/qla2xxx/qla_bsg.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/scsi/qla2xxx/qla_bsg.c b/drivers/scsi/qla2xxx/qla_bsg.c index e2d5d3ca0f57..c11a89be292c 100644 --- a/drivers/scsi/qla2xxx/qla_bsg.c +++ b/drivers/scsi/qla2xxx/qla_bsg.c @@ -1035,7 +1035,7 @@ qla84xx_updatefw(struct bsg_job *bsg_job) sg_copy_to_buffer(bsg_job->request_payload.sg_list, bsg_job->request_payload.sg_cnt, fw_buf, data_len); - mn = dma_pool_alloc(ha->s_dma_pool, GFP_KERNEL, &mn_dma); + mn = dma_pool_zalloc(ha->s_dma_pool, GFP_KERNEL, &mn_dma); if (!mn) { ql_log(ql_log_warn, vha, 0x7036, "DMA alloc failed for fw buffer.\n"); @@ -1046,7 +1046,6 @@ qla84xx_updatefw(struct bsg_job *bsg_job) flag = bsg_request->rqst_data.h_vendor.vendor_cmd[1]; fw_ver = le32_to_cpu(*((uint32_t *)((uint32_t *)fw_buf + 2))); - memset(mn, 0, sizeof(struct access_chip_84xx)); mn->entry_type = VERIFY_CHIP_IOCB_TYPE; mn->entry_count = 1; |