diff mbox series

[36/82] crypto/scheduler: remove unnecessary NULL checks

Message ID 20220124000518.319850-37-stephen@networkplumber.org (mailing list archive)
State Superseded, archived
Delegated to: Thomas Monjalon
Headers show
Series remove unnecessary null checks | expand

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Stephen Hemminger Jan. 24, 2022, 12:04 a.m. UTC
Remove redundant NULL pointer checks before free functions
found by nullfree.cocci

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
 drivers/crypto/scheduler/scheduler_pmd_ops.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
diff mbox series

Patch

diff --git a/drivers/crypto/scheduler/scheduler_pmd_ops.c b/drivers/crypto/scheduler/scheduler_pmd_ops.c
index f61640c9d646..f3a1bd626c6f 100644
--- a/drivers/crypto/scheduler/scheduler_pmd_ops.c
+++ b/drivers/crypto/scheduler/scheduler_pmd_ops.c
@@ -371,10 +371,8 @@  scheduler_pmd_qp_release(struct rte_cryptodev *dev, uint16_t qp_id)
 	if (!qp_ctx)
 		return 0;
 
-	if (qp_ctx->order_ring)
-		rte_ring_free(qp_ctx->order_ring);
-	if (qp_ctx->private_qp_ctx)
-		rte_free(qp_ctx->private_qp_ctx);
+	rte_ring_free(qp_ctx->order_ring);
+	rte_free(qp_ctx->private_qp_ctx);
 
 	rte_free(qp_ctx);
 	dev->data->queue_pairs[qp_id] = NULL;