Message ID | 8dfa1135-5691-caf7-84e9-b30419c69187@users.sourceforge.net (mailing list archive) |
---|---|
State | Changes Requested |
Headers | show |
diff --git a/drivers/infiniband/hw/mlx5/srq.c b/drivers/infiniband/hw/mlx5/srq.c index 7cb145f9a6db..8ba1953177af 100644 --- a/drivers/infiniband/hw/mlx5/srq.c +++ b/drivers/infiniband/hw/mlx5/srq.c @@ -195,8 +195,9 @@ static int create_srq_kernel(struct mlx5_ib_dev *dev, struct mlx5_ib_srq *srq, goto err_buf; } mlx5_fill_page_array(&srq->buf, in->pas); - - srq->wrid = kmalloc(srq->msrq.max * sizeof(u64), GFP_KERNEL); + srq->wrid = kmalloc_array(srq->msrq.max, + sizeof(*srq->wrid), + GFP_KERNEL); if (!srq->wrid) { err = -ENOMEM; goto err_in;