aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/infiniband/hw/mthca/mthca_provider.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/infiniband/hw/mthca/mthca_provider.c b/drivers/infiniband/hw/mthca/mthca_provider.c
index 293c69b1e48f..55a338da9970 100644
--- a/drivers/infiniband/hw/mthca/mthca_provider.c
+++ b/drivers/infiniband/hw/mthca/mthca_provider.c
@@ -568,8 +568,9 @@ static struct ib_mr *mthca_reg_phys_mr(struct ib_pd *pd,
568 568
569static int mthca_dereg_mr(struct ib_mr *mr) 569static int mthca_dereg_mr(struct ib_mr *mr)
570{ 570{
571 mthca_free_mr(to_mdev(mr->device), to_mmr(mr)); 571 struct mthca_mr *mmr = to_mmr(mr);
572 kfree(mr); 572 mthca_free_mr(to_mdev(mr->device), mmr);
573 kfree(mmr);
573 return 0; 574 return 0;
574} 575}
575 576