diff --git a/providers/bnxt_re/verbs.c b/providers/bnxt_re/verbs.c index e35f665b3..18e6893d5 100644 --- a/providers/bnxt_re/verbs.c +++ b/providers/bnxt_re/verbs.c @@ -328,8 +328,10 @@ struct ibv_cq *bnxt_re_create_cq(struct ibv_context *ibvctx, int ncqe, struct bnxt_re_context *cntx = to_bnxt_re_context(ibvctx); struct bnxt_re_dev *dev = to_bnxt_re_dev(ibvctx->device); - if (ncqe > dev->max_cq_depth) + if (ncqe > dev->max_cq_depth) { + errno = EINVAL; return NULL; + } cq = calloc(1, (sizeof(*cq) + sizeof(struct bnxt_re_queue))); if (!cq)