diff mbox

[2/8] verbs: Remove duplicate NULL test from flow ops

Message ID 20171205231721.19410-3-jgg@ziepe.ca (mailing list archive)
State Not Applicable
Headers show

Commit Message

Jason Gunthorpe Dec. 5, 2017, 11:17 p.m. UTC
From: Jason Gunthorpe <jgg@mellanox.com>

The verbs_get_ctx_op macro already checks if the op is NULL.

Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
---
 libibverbs/verbs.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff mbox

Patch

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);
 }