summaryrefslogtreecommitdiff
path: root/drivers/scsi/qla2xxx/qla_target.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/qla2xxx/qla_target.c')
-rw-r--r--drivers/scsi/qla2xxx/qla_target.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/scsi/qla2xxx/qla_target.c b/drivers/scsi/qla2xxx/qla_target.c
index b85c833099ff..0fea2e2326be 100644
--- a/drivers/scsi/qla2xxx/qla_target.c
+++ b/drivers/scsi/qla2xxx/qla_target.c
@@ -6248,8 +6248,9 @@ int qlt_add_target(struct qla_hw_data *ha, struct scsi_qla_host *base_vha)
return -ENOMEM;
}
- tgt->qphints = kzalloc((ha->max_qpairs + 1) *
- sizeof(struct qla_qpair_hint), GFP_KERNEL);
+ tgt->qphints = kcalloc(ha->max_qpairs + 1,
+ sizeof(struct qla_qpair_hint),
+ GFP_KERNEL);
if (!tgt->qphints) {
kfree(tgt);
ql_log(ql_log_warn, base_vha, 0x0197,
@@ -7089,8 +7090,9 @@ qlt_mem_alloc(struct qla_hw_data *ha)
if (!QLA_TGT_MODE_ENABLED())
return 0;
- ha->tgt.tgt_vp_map = kzalloc(sizeof(struct qla_tgt_vp_map) *
- MAX_MULTI_ID_FABRIC, GFP_KERNEL);
+ ha->tgt.tgt_vp_map = kcalloc(MAX_MULTI_ID_FABRIC,
+ sizeof(struct qla_tgt_vp_map),
+ GFP_KERNEL);
if (!ha->tgt.tgt_vp_map)
return -ENOMEM;