]> git.openfabrics.org - ~shefty/rdma-win.git/commitdiff
[MLX4] bug fix in error flow: doesn't return error on allocation failure. [mlnx:...
authorleonidk <leonidk@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Sun, 16 Aug 2009 14:12:09 +0000 (14:12 +0000)
committerleonidk <leonidk@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Sun, 16 Aug 2009 14:12:09 +0000 (14:12 +0000)
git-svn-id: svn://openib.tc.cornell.edu/gen1@2356 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86

trunk/hw/mlx4/kernel/bus/core/l2w_umem.c

index 245ca6bbdc4351ae3994b3df48fb848e4f74bc30..e766b95386c71c5c7e359a07a424ce7e18308883 100644 (file)
@@ -55,7 +55,7 @@ struct ib_umem *ib_umem_get(struct ib_ucontext *context, u64 addr,
        // create the object
        p_ib_umem = kzalloc(sizeof *p_ib_umem, GFP_KERNEL);
        if (!p_ib_umem)
-               goto done;
+               goto err_nomem;
 
        p_ib_umem->p_uctx = context;
        p_ib_umem->page_size = PAGE_SIZE;
@@ -95,6 +95,8 @@ err_secure:
 
 err_reg_mem:   
        kfree(p_ib_umem);
+
+err_nomem:     
        p_ib_umem = ERR_PTR(-ENOMEM);
 
 done: