]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/infiniband/core/uverbs_mem.c
Merge git://git.infradead.org/~dwmw2/cafe-2.6
[linux-2.6-omap-h63xx.git] / drivers / infiniband / core / uverbs_mem.c
index ed550f6595bd7c07efa8d8597c1715f6cd8dd653..efe147dbeb42137e695298e19c525e1acf027a07 100644 (file)
@@ -1,6 +1,7 @@
 /*
  * Copyright (c) 2005 Topspin Communications.  All rights reserved.
  * Copyright (c) 2005 Cisco Systems.  All rights reserved.
+ * Copyright (c) 2005 Mellanox Technologies. All rights reserved.
  *
  * This software is available to you under a choice of one of two
  * licenses.  You may choose to be licensed under the terms of the GNU
@@ -210,8 +211,10 @@ void ib_umem_release_on_close(struct ib_device *dev, struct ib_umem *umem)
         */
 
        work = kmalloc(sizeof *work, GFP_KERNEL);
-       if (!work)
+       if (!work) {
+               mmput(mm);
                return;
+       }
 
        INIT_WORK(&work->work, ib_umem_account, work);
        work->mm   = mm;