From: Stephen Hemminger <stephen@networkplumber.org>
To: dev@dpdk.org
Cc: Stephen Hemminger <stephen@networkplumber.org>,
Junlong Wang <wang.junlong1@zte.com.cn>,
Lijie Shan <shan.lijie@zte.com.cn>
Subject: [PATCH] net/zxdh: remove unnecessary null free check
Date: Wed, 24 Sep 2025 13:22:52 -0700 [thread overview]
Message-ID: <20250924202252.472101-1-stephen@networkplumber.org> (raw)
Found with coccinell null free script.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
drivers/net/zxdh/zxdh_np.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/net/zxdh/zxdh_np.c b/drivers/net/zxdh/zxdh_np.c
index 21c749c67a..98b95532cd 100644
--- a/drivers/net/zxdh/zxdh_np.c
+++ b/drivers/net/zxdh/zxdh_np.c
@@ -12330,8 +12330,7 @@ zxdh_np_dtb_acl_data_clear(uint32_t dev_id, uint32_t queue_id,
&element_id);
free(data_buff);
free(mask_buff);
- if (eram_buff)
- free(eram_buff);
+ free(eram_buff);
free(p_entry_arr);
ZXDH_COMM_CHECK_DEV_RC(dev_id, rc, "zxdh_np_dtb_acl_dma_insert");
--
2.47.3
next reply other threads:[~2025-09-24 20:23 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-24 20:22 Stephen Hemminger [this message]
2025-09-25 16:54 ` 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=20250924202252.472101-1-stephen@networkplumber.org \
--to=stephen@networkplumber.org \
--cc=dev@dpdk.org \
--cc=shan.lijie@zte.com.cn \
--cc=wang.junlong1@zte.com.cn \
/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;
as well as URLs for NNTP newsgroup(s).