[PATCH] IB/mthca: release mutex on doorbell alloc error path
authorRoland Dreier <roland@topspin.com>
Sat, 16 Apr 2005 22:26:20 +0000 (15:26 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Sat, 16 Apr 2005 22:26:20 +0000 (15:26 -0700)
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>
drivers/infiniband/hw/mthca/mthca_memfree.c

index e8f9347..46981d4 100644 (file)
@@ -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)