aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoland Dreier <roland@topspin.com>2005-04-16 15:26:20 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 15:26:20 -0700
commit2714eb5a4fb2b461b452fb8a2f65c8caacdd12d5 (patch)
tree6c40a85c5cb34e4a4f77b5b7274ca56987d9ab70
parent[PATCH] IB/mthca: fix MR allocation error path (diff)
downloadlinux-dev-2714eb5a4fb2b461b452fb8a2f65c8caacdd12d5.tar.xz
linux-dev-2714eb5a4fb2b461b452fb8a2f65c8caacdd12d5.zip
[PATCH] IB/mthca: release mutex on doorbell alloc error path
Release mutex on error return path from mthca_alloc_db(). Signed-off-by: Roland Dreier <roland@topspin.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r--drivers/infiniband/hw/mthca/mthca_memfree.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/mthca/mthca_memfree.c b/drivers/infiniband/hw/mthca/mthca_memfree.c
index e8f93478f38d..46981d48c232 100644
--- a/drivers/infiniband/hw/mthca/mthca_memfree.c
+++ b/drivers/infiniband/hw/mthca/mthca_memfree.c
@@ -337,7 +337,8 @@ int mthca_alloc_db(struct mthca_dev *dev, int type, u32 qn, u32 **db)
break;
default:
- return -1;
+ ret = -EINVAL;
+ goto out;
}
for (i = start; i != end; i += dir)