From: Stephen Hemminger <stephen@networkplumber.org>
To: dev@dpdk.org
Cc: Stephen Hemminger <stephen@networkplumber.org>,
Ankur Dwivedi <adwivedi@marvell.com>,
Anoob Joseph <anoobj@marvell.com>,
Tejasree Kondoj <ktejasree@marvell.com>
Subject: [PATCH 1/3] crypto/cnxk: remove unnecessary null check
Date: Tue, 1 Dec 2026 15:25:51 -0800 [thread overview]
Message-ID: <20261201232553.2143504-1-stephen@networkplumber.org> (raw)
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
next reply other threads:[~2026-12-01 23:25 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-01 23:25 Stephen Hemminger [this message]
2026-12-01 23:25 ` [PATCH 2/3] net/octeon_ep: remove unnecessary null check Stephen Hemminger
2026-12-01 23:25 ` [PATCH 3/3] net/idpf: " Stephen Hemminger
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261201232553.2143504-1-stephen@networkplumber.org \
--to=stephen@networkplumber.org \
--cc=adwivedi@marvell.com \
--cc=anoobj@marvell.com \
--cc=dev@dpdk.org \
--cc=ktejasree@marvell.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox