From: Stephen Hemminger <stephen@networkplumber.org>
To: dev@dpdk.org
Cc: Stephen Hemminger <stephen@networkplumber.org>,
Vamsi Attunuru <vattunuru@marvell.com>
Subject: [PATCH 2/3] net/octeon_ep: remove unnecessary null check
Date: Tue, 1 Dec 2026 15:25:52 -0800 [thread overview]
Message-ID: <20261201232553.2143504-2-stephen@networkplumber.org> (raw)
In-Reply-To: <20261201232553.2143504-1-stephen@networkplumber.org>
No need for null check before calling rte_free.
Found by devtools/cocci/nullfree.cocci
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
drivers/net/octeon_ep/cn20k_ep_mbox.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/net/octeon_ep/cn20k_ep_mbox.c b/drivers/net/octeon_ep/cn20k_ep_mbox.c
index 8140ea07c7..3467dcae1e 100644
--- a/drivers/net/octeon_ep/cn20k_ep_mbox.c
+++ b/drivers/net/octeon_ep/cn20k_ep_mbox.c
@@ -415,8 +415,7 @@ otx_ep_cn20k_setup_mbox(struct otx_ep_device *otx_ep)
return 0;
free_mbox:
- if (mbox_info->bbuf_base)
- rte_free(mbox_info->bbuf_base);
+ rte_free(mbox_info->bbuf_base);
rte_free(mbox_info);
otx_ep->mbox_info = NULL;
return ret;
@@ -430,8 +429,7 @@ otx_ep_cn20k_delete_mbox(struct otx_ep_device *otx_ep)
if (!mbox_info)
return;
- if (mbox_info->bbuf_base)
- rte_free(mbox_info->bbuf_base);
+ rte_free(mbox_info->bbuf_base);
rte_free(mbox_info);
otx_ep->mbox_info = NULL;
--
2.53.0
next prev parent reply other threads:[~2026-12-01 23:26 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-01 23:25 [PATCH 1/3] crypto/cnxk: remove unnecessary null check Stephen Hemminger
2026-12-01 23:25 ` Stephen Hemminger [this message]
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-2-stephen@networkplumber.org \
--to=stephen@networkplumber.org \
--cc=dev@dpdk.org \
--cc=vattunuru@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