tree 600a28a4fcdaf518144c49acfe1e5d1e9f6042c6
parent 732e2ee9c0c7a3aa3c618b6cb437c83bbef09c69
author Roland Dreier <[EMAIL PROTECTED]> Tue Apr 12 08:26:44 2005
committer Linus Torvalds <[EMAIL PROTECTED]> Tue Apr 12 08:26:44 2005

[PATCH] IB/mthca: clean up mthca_dereg_mr()

It's cleaner to kfree mthca_mr, and not rely on the fact that ib_mr is the
first field in mthca_mr.

Signed-off-by: Michael S. Tsirkin <[EMAIL PROTECTED]>
Signed-off-by: Roland Dreier <[EMAIL PROTECTED]>
Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>

 mthca_provider.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

Index: drivers/infiniband/hw/mthca/mthca_provider.c
===================================================================
--- 
aa5cf5aba86172d6602bbafe3c52a09bc81735b3/drivers/infiniband/hw/mthca/mthca_provider.c
  (mode:100644 sha1:0db2e5ea7d2c83a85e817a249d2df04f1a325333)
+++ 
600a28a4fcdaf518144c49acfe1e5d1e9f6042c6/drivers/infiniband/hw/mthca/mthca_provider.c
  (mode:100644 sha1:ff8d2cd92012f6949c17a44af2f9190addc2e6b3)
@@ -568,8 +568,9 @@
 
 static int mthca_dereg_mr(struct ib_mr *mr)
 {
-       mthca_free_mr(to_mdev(mr->device), to_mmr(mr));
-       kfree(mr);
+       struct mthca_mr *mmr = to_mmr(mr);
+       mthca_free_mr(to_mdev(mr->device), mmr);
+       kfree(mmr);
        return 0;
 }
 
-
To unsubscribe from this list: send the line "unsubscribe bk-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to