summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/qla2xxx/qla_bsg.c
diff options
context:
space:
mode:
authorThomas Meyer <thomas@m3y3r.de>2017-09-21 08:15:26 +0200
committerMartin K. Petersen <martin.petersen@oracle.com>2017-09-25 19:07:18 -0400
commit08eb7f45de6131a72db7dd82607fd204d0d2bac2 (patch)
tree35a97be72b49176a6b8960950758ebb48c0f07df /drivers/scsi/qla2xxx/qla_bsg.c
parentdf2f7729f23fdab923c913302051997561e1ef07 (diff)
downloadblackbird-op-linux-08eb7f45de6131a72db7dd82607fd204d0d2bac2.tar.gz
blackbird-op-linux-08eb7f45de6131a72db7dd82607fd204d0d2bac2.zip
scsi: qla2xxx: Cocci spatch "pool_zalloc-simple"
Use *_pool_zalloc rather than *_pool_alloc followed by memset with 0. Found by coccinelle spatch "api/alloc/pool_zalloc-simple.cocci" Signed-off-by: Thomas Meyer <thomas@m3y3r.de> 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.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/scsi/qla2xxx/qla_bsg.c b/drivers/scsi/qla2xxx/qla_bsg.c
index 2ea0ef93f5cb..451d9709bc06 100644
--- a/drivers/scsi/qla2xxx/qla_bsg.c
+++ b/drivers/scsi/qla2xxx/qla_bsg.c
@@ -1116,14 +1116,13 @@ qla84xx_mgmt_cmd(struct bsg_job *bsg_job)
return -EINVAL;
}
- 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, 0x703c,
"DMA alloc failed for fw buffer.\n");
return -ENOMEM;
}
- memset(mn, 0, sizeof(struct access_chip_84xx));
mn->entry_type = ACCESS_CHIP_IOCB_TYPE;
mn->entry_count = 1;
ql84_mgmt = (void *)bsg_request + sizeof(struct fc_bsg_request);
OpenPOWER on IntegriCloud