diff --git a/iscsi-scst/kernel/isert-scst/iser_rdma.c b/iscsi-scst/kernel/isert-scst/iser_rdma.c index 1f1c56e66..6a1e9279d 100644 --- a/iscsi-scst/kernel/isert-scst/iser_rdma.c +++ b/iscsi-scst/kernel/isert-scst/iser_rdma.c @@ -870,7 +870,8 @@ static struct isert_device *isert_device_create(struct ib_device *ib_dev) isert_dev->num_cqs = min_t(int, num_online_cpus(), ib_dev->num_comp_vectors); - isert_dev->cq_qps = kzalloc(sizeof(*isert_dev->cq_qps) * isert_dev->num_cqs, + isert_dev->cq_qps = kcalloc(isert_dev->num_cqs, + sizeof(*isert_dev->cq_qps), GFP_KERNEL); if (unlikely(isert_dev->cq_qps == NULL)) { pr_err("Failed to allocate iser cq_qps\n"); diff --git a/iscsi-scst/kernel/isert-scst/isert_login.c b/iscsi-scst/kernel/isert-scst/isert_login.c index 517a6f257..0a3720306 100644 --- a/iscsi-scst/kernel/isert-scst/isert_login.c +++ b/iscsi-scst/kernel/isert-scst/isert_login.c @@ -952,7 +952,7 @@ int __init isert_init_login_devs(unsigned int ndevs) * allocate the devices -- we can't have them static, as the number * can be specified at load time */ - isert_conn_devices = kzalloc(n_devs * sizeof(struct isert_conn_dev), + isert_conn_devices = kcalloc(n_devs, sizeof(struct isert_conn_dev), GFP_KERNEL); if (unlikely(!isert_conn_devices)) { res = -ENOMEM;