summaryrefslogtreecommitdiff
path: root/drivers/scsi/qla2xxx/qla_init.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/qla2xxx/qla_init.c')
-rw-r--r--drivers/scsi/qla2xxx/qla_init.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c
index 1aa3720ea2ed..fbbb328c64d5 100644
--- a/drivers/scsi/qla2xxx/qla_init.c
+++ b/drivers/scsi/qla2xxx/qla_init.c
@@ -3089,8 +3089,9 @@ qla2x00_alloc_outstanding_cmds(struct qla_hw_data *ha, struct req_que *req)
req->num_outstanding_cmds = ha->cur_fw_iocb_count;
}
- req->outstanding_cmds = kzalloc(sizeof(srb_t *) *
- req->num_outstanding_cmds, GFP_KERNEL);
+ req->outstanding_cmds = kcalloc(req->num_outstanding_cmds,
+ sizeof(srb_t *),
+ GFP_KERNEL);
if (!req->outstanding_cmds) {
/*
@@ -3098,8 +3099,9 @@ qla2x00_alloc_outstanding_cmds(struct qla_hw_data *ha, struct req_que *req)
* initialization.
*/
req->num_outstanding_cmds = MIN_OUTSTANDING_COMMANDS;
- req->outstanding_cmds = kzalloc(sizeof(srb_t *) *
- req->num_outstanding_cmds, GFP_KERNEL);
+ req->outstanding_cmds = kcalloc(req->num_outstanding_cmds,
+ sizeof(srb_t *),
+ GFP_KERNEL);
if (!req->outstanding_cmds) {
ql_log(ql_log_fatal, NULL, 0x0126,