[PATCH 16/17] crypto/cnxk: remove null check of session priv
Tejasree Kondoj
ktejasree at marvell.com
Tue Dec 20 15:32:31 CET 2022
From: Anoob Joseph <anoobj at marvell.com>
Session private data is at an offset of session. This can never be
NULL. Remove check for the same.
Signed-off-by: Anoob Joseph <anoobj at marvell.com>
---
drivers/crypto/cnxk/cn10k_ipsec.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/crypto/cnxk/cn10k_ipsec.c b/drivers/crypto/cnxk/cn10k_ipsec.c
index aafd461436..ffd3f50eed 100644
--- a/drivers/crypto/cnxk/cn10k_ipsec.c
+++ b/drivers/crypto/cnxk/cn10k_ipsec.c
@@ -422,14 +422,12 @@ cn10k_sec_session_update(void *device, struct rte_security_session *sess,
struct rte_security_session_conf *conf)
{
struct rte_cryptodev *crypto_dev = device;
- struct cn10k_sec_session *priv;
struct roc_cpt *roc_cpt;
struct cnxk_cpt_qp *qp;
struct cnxk_cpt_vf *vf;
int ret;
- priv = SECURITY_GET_SESS_PRIV(sess);
- if (priv == NULL)
+ if (sess == NULL)
return -EINVAL;
qp = crypto_dev->data->queue_pairs[0];
--
2.25.1
More information about the dev
mailing list