From: Selvin Xavier Date: Tue, 4 Feb 2014 06:27:02 +0000 (+0530) Subject: RDMA/ocrdma: Memory leak fix in ocrdma_dereg_mr() X-Git-Tag: v3.15-rc1~103^2^8~9 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9d1878a369b23f48a5ca5bcbd89abb0e569c58cc;p=platform%2Fkernel%2Flinux-exynos.git RDMA/ocrdma: Memory leak fix in ocrdma_dereg_mr() Signed-off-by: Selvin Xavier Signed-off-by: Devesh Sharma Signed-off-by: Roland Dreier --- diff --git a/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c b/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c index c5b4058..8cc00d2 100644 --- a/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c +++ b/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c @@ -840,8 +840,7 @@ int ocrdma_dereg_mr(struct ib_mr *ib_mr) status = ocrdma_mbx_dealloc_lkey(dev, mr->hwmr.fr_mr, mr->hwmr.lkey); - if (mr->hwmr.fr_mr == 0) - ocrdma_free_mr_pbl_tbl(dev, &mr->hwmr); + ocrdma_free_mr_pbl_tbl(dev, &mr->hwmr); /* it could be user registered memory. */ if (mr->umem)