From: Christophe JAILLET Date: Thu, 5 Aug 2021 17:43:36 +0000 (+0200) Subject: RDMA/rtrs: Remove a useless kfree() X-Git-Tag: accepted/tizen/unified/20230118.172025~6416^2~41 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=00c85b6576d3a9c9d9f0320a59b1e7b5bd25ade4;p=platform%2Fkernel%2Flinux-rpi.git RDMA/rtrs: Remove a useless kfree() 'sess->rbufs' is known to be NULL here, so there is no point in kfree'ing it. Fixes: 6a98d71daea1 ("RDMA/rtrs: client: main functionality") Link: https://lore.kernel.org/r/9a57c9f837fa2c6f0070578a1bc4840688f62962.1628185335.git.christophe.jaillet@wanadoo.fr Signed-off-by: Christophe JAILLET Acked-by: Md Haris Iqbal Signed-off-by: Jason Gunthorpe --- diff --git a/drivers/infiniband/ulp/rtrs/rtrs-clt.c b/drivers/infiniband/ulp/rtrs/rtrs-clt.c index ece3205..fc440a0 100644 --- a/drivers/infiniband/ulp/rtrs/rtrs-clt.c +++ b/drivers/infiniband/ulp/rtrs/rtrs-clt.c @@ -1844,7 +1844,6 @@ static int rtrs_rdma_conn_established(struct rtrs_clt_con *con, } if (!sess->rbufs) { - kfree(sess->rbufs); sess->rbufs = kcalloc(queue_depth, sizeof(*sess->rbufs), GFP_KERNEL); if (!sess->rbufs)