[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/trunk@2356 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86

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

index 245ca6b..e766b95 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: