From mboxrd@z Thu Jan 1 00:00:00 1970 From: Saeed Mahameed Subject: [for-next 03/15] IB/mlx5: Use 'kvfree()' for memory allocated by 'kvzalloc()' Date: Thu, 17 May 2018 18:22:46 -0700 Message-ID: <20180518012258.26968-4-saeedm@mellanox.com> References: <20180518012258.26968-1-saeedm@mellanox.com> Cc: Jason Gunthorpe , Leon Romanovsky , Or Gerlitz , netdev@vger.kernel.org, linux-rdma@vger.kernel.org, Christophe JAILLET , Saeed Mahameed To: "David S. Miller" , Doug Ledford Return-path: Received: from mail-il-dmz.mellanox.com ([193.47.165.129]:42700 "EHLO mellanox.co.il" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752342AbeERBX0 (ORCPT ); Thu, 17 May 2018 21:23:26 -0400 In-Reply-To: <20180518012258.26968-1-saeedm@mellanox.com> Sender: netdev-owner@vger.kernel.org List-ID: From: Christophe JAILLET 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 --- drivers/infiniband/hw/mlx5/cq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); -- 2.17.0