[MLX4] fixed incorrect return code in bad flow, which caused kernel crash. [MLNX...
authorleonidk <leonidk@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Wed, 21 May 2008 14:13:22 +0000 (14:13 +0000)
committerleonidk <leonidk@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Wed, 21 May 2008 14:13:22 +0000 (14:13 +0000)
git-svn-id: svn://openib.tc.cornell.edu/gen1/trunk@1198 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86

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

index fe449c4..ebb5061 100644 (file)
@@ -76,7 +76,7 @@ err_secure:
 
 err_reg_mem:   
        kfree(p_ib_umem);
-       p_ib_umem = NULL;
+       p_ib_umem = ERR_PTR(-ENOMEM);
 
 done:  
        MLX4_EXIT(MLX4_DBG_MEMORY);
@@ -162,3 +162,4 @@ void ib_umem_unmap(
        }
 }
 
+