mirror of
https://github.com/SCST-project/scst.git
synced 2026-08-20 06:06:23 +00:00
isert-scst: Use kcalloc() instead of kzalloc() with multiply
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6624 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
@@ -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");
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user