[16/17] crypto/cnxk: remove null check of session priv

Message ID 20221220143232.2519650-17-ktejasree@marvell.com (mailing list archive)
State Accepted, archived
Delegated to: akhil goyal
Headers
Series fixes and improvements to cnxk crytpo PMD |

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Tejasree Kondoj Dec. 20, 2022, 2:32 p.m. UTC
  From: Anoob Joseph <anoobj@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@marvell.com>
---
 drivers/crypto/cnxk/cn10k_ipsec.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
  

Patch

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];