Upon QP creation failure provider's create_qp function sets errno with error code and return NULL to caller. Let's return this errno to caller to reflect the exact reason for the error. Signed-off-by: Yuval Shaia <yuval.shaia@xxxxxxxxxx> --- librdmacm/cma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/librdmacm/cma.c b/librdmacm/cma.c index fa370650..e92a022c 100644 --- a/librdmacm/cma.c +++ b/librdmacm/cma.c @@ -1369,7 +1369,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 = ERR(errno); goto err1; } -- 2.14.3 -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html