[PATCH v2 35/83] crypto/octeontx: remove unnecessary NULL checks
Stephen Hemminger
stephen at networkplumber.org
Mon Jan 24 18:46:31 CET 2022
Remove redundant NULL pointer checks before free functions
found by nullfree.cocci
Signed-off-by: Stephen Hemminger <stephen at networkplumber.org>
---
drivers/crypto/octeontx/otx_cryptodev_ops.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
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());
--
2.30.2
More information about the dev
mailing list