diff --git a/librdmacm/cma.c b/librdmacm/cma.c index ff298fb2e..6128fbc0f 100644 --- a/librdmacm/cma.c +++ b/librdmacm/cma.c @@ -473,7 +473,7 @@ static int ucma_get_device(struct cma_id_private *id_priv, __be64 guid) cma_dev->pd = ibv_alloc_pd(cma_dev->verbs); if (!cma_dev->pd) { cma_dev->refcnt--; - ret = ERR(ENOMEM); + ret = -1; goto out; } } @@ -1308,7 +1308,7 @@ static int ucma_create_cqs(struct rdma_cm_id *id, uint32_t send_size, uint32_t r return 0; err: ucma_destroy_cqs(id); - return ERR(ENOMEM); + return -1; } int rdma_create_srq_ex(struct rdma_cm_id *id, struct ibv_srq_init_attr_ex *attr) @@ -1425,7 +1425,7 @@ int rdma_create_qp_ex(struct rdma_cm_id *id, attr->srq = id->srq; qp = ibv_create_qp_ex(id->verbs, attr); if (!qp) { - ret = ERR(ENOMEM); + ret = -1; goto err1; }