From: Roland Dreier Date: Sat, 16 Apr 2005 22:26:20 +0000 (-0700) Subject: [PATCH] IB/mthca: release mutex on doorbell alloc error path X-Git-Tag: v2.6.12-rc3~74 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2714eb5a4fb2b461b452fb8a2f65c8caacdd12d5;p=linux-2.6 [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 Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/drivers/infiniband/hw/mthca/mthca_memfree.c b/drivers/infiniband/hw/mthca/mthca_memfree.c index e8f93478f3..46981d48c2 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)