[MLX4] fixed incorrect return code in bad flow, which caused kernel crash. [MLNX...
authorleonidk <leonidk@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Sun, 25 May 2008 15:56:26 +0000 (15:56 +0000)
committerleonidk <leonidk@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Sun, 25 May 2008 15:56:26 +0000 (15:56 +0000)
git-svn-id: svn://openib.tc.cornell.edu/gen1/trunk@1208 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86

hw/mlx4/kernel/bus/ib/mr.c

index b142d9f..4608e58 100644 (file)
@@ -130,7 +130,7 @@ struct ib_mr *mlx4_ib_reg_user_mr(struct ib_pd *pd, u64 start, u64 length,
                return ERR_PTR(-ENOMEM);
 
        mr->umem = ib_umem_get(pd->p_uctx, start, (size_t)length, access_flags);
-       if (mr->umem == NULL) {
+       if (IS_ERR(mr->umem)) {
                // there can be also second reason of failue - insufficient memory,
                // but we can't get awared of that without changing ib_umem_get prototype
                err = -EACCES;