DPDK-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/3] crypto/cnxk: remove unnecessary null check
@ 2026-12-01 23:25 Stephen Hemminger
  2026-12-01 23:25 ` [PATCH 2/3] net/octeon_ep: " Stephen Hemminger
  2026-12-01 23:25 ` [PATCH 3/3] net/idpf: " Stephen Hemminger
  0 siblings, 2 replies; 3+ messages in thread
From: Stephen Hemminger @ 2026-12-01 23:25 UTC (permalink / raw)
  To: dev; +Cc: Stephen Hemminger, Ankur Dwivedi, Anoob Joseph, Tejasree Kondoj

No need to check for NULL before calling rte_free
Found by devtools/cocci/nullfree.cocci

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
 drivers/crypto/cnxk/cn20k_tls.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/crypto/cnxk/cn20k_tls.c b/drivers/crypto/cnxk/cn20k_tls.c
index ac6f6d9c4b..62bb71f035 100644
--- a/drivers/crypto/cnxk/cn20k_tls.c
+++ b/drivers/crypto/cnxk/cn20k_tls.c
@@ -799,8 +799,7 @@ cn20k_tls_write_sa_create(struct roc_cpt *roc_cpt, struct roc_cpt_lf *lf,
 
 	rte_atomic_thread_fence(rte_memory_order_seq_cst);
 
-	if (tls->write_sa != NULL)
-		rte_free(tls->write_sa);
+	rte_free(tls->write_sa);
 	tls->write_sa = write_sa;
 sa_dptr_free:
 	plt_free(sa_dptr);
-- 
2.53.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-12-01 23:26 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-12-01 23:25 [PATCH 1/3] crypto/cnxk: remove unnecessary null check Stephen Hemminger
2026-12-01 23:25 ` [PATCH 2/3] net/octeon_ep: " Stephen Hemminger
2026-12-01 23:25 ` [PATCH 3/3] net/idpf: " Stephen Hemminger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox