From: Jason Gunthorpe <jgg@xxxxxxxxxxxx> The verbs_get_ctx_op macro already checks if the op is NULL. Signed-off-by: Jason Gunthorpe <jgg@xxxxxxxxxxxx> --- libibverbs/verbs.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libibverbs/verbs.h b/libibverbs/verbs.h index b39dc30a6d2a6e..b9db76bc628707 100644 --- a/libibverbs/verbs.h +++ b/libibverbs/verbs.h @@ -1832,7 +1832,7 @@ static inline struct ibv_flow *ibv_create_flow(struct ibv_qp *qp, { struct verbs_context *vctx = verbs_get_ctx_op(qp->context, ibv_create_flow); - if (!vctx || !vctx->ibv_create_flow) { + if (!vctx) { errno = ENOSYS; return NULL; } @@ -1844,7 +1844,7 @@ static inline int ibv_destroy_flow(struct ibv_flow *flow_id) { struct verbs_context *vctx = verbs_get_ctx_op(flow_id->context, ibv_destroy_flow); - if (!vctx || !vctx->ibv_destroy_flow) + if (!vctx) return -ENOSYS; return vctx->ibv_destroy_flow(flow_id); } -- 2.15.1 -- 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