From: Christophe JAILLET Date: Thu, 17 May 2018 00:50:19 +0000 (-0700) Subject: IB/mlx5: Use 'kvfree()' for memory allocated by 'kvzalloc()' X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=909d434406f9e7887ffb1ddaff1a7d0da50075b1;p=openwrt%2Fstaging%2Fblogic.git IB/mlx5: Use 'kvfree()' for memory allocated by 'kvzalloc()' When 'kvzalloc()' is used to allocate memory, 'kvfree()' must be used to free it. Fixes: 1cbe6fc86ccfe ("IB/mlx5: Add support for CQE compressing") Signed-off-by: Christophe JAILLET Acked-by: Jason Gunthorpe Signed-off-by: Saeed Mahameed --- diff --git a/drivers/infiniband/hw/mlx5/cq.c b/drivers/infiniband/hw/mlx5/cq.c index 77d257ec899b..6d52ea03574e 100644 --- a/drivers/infiniband/hw/mlx5/cq.c +++ b/drivers/infiniband/hw/mlx5/cq.c @@ -849,7 +849,7 @@ static int create_cq_user(struct mlx5_ib_dev *dev, struct ib_udata *udata, return 0; err_cqb: - kfree(*cqb); + kvfree(*cqb); err_db: mlx5_ib_db_unmap_user(to_mucontext(context), &cq->db);