diff mbox series

[34/82] crypto/octeontx: remove unnecessary NULL checks

Message ID 20220124000518.319850-35-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/octeontx/otx_cryptodev_ops.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/drivers/crypto/octeontx/otx_cryptodev_ops.c b/drivers/crypto/octeontx/otx_cryptodev_ops.c
index f7ca8a8a8e90..f1aae481c3c6 100644
--- a/drivers/crypto/octeontx/otx_cryptodev_ops.c
+++ b/drivers/crypto/octeontx/otx_cryptodev_ops.c
@@ -335,8 +335,7 @@  sym_session_clear(int driver_id, struct rte_cryptodev_sym_session *sess)
 	misc = priv;
 	ctx = SESS_PRIV(misc);
 
-	if (ctx->auth_key != NULL)
-		rte_free(ctx->auth_key);
+	rte_free(ctx->auth_key);
 
 	memset(priv, 0, cpt_get_session_size());