DPDK-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: dev@dpdk.org
Cc: Stephen Hemminger <stephen@networkplumber.org>,
	Jingjing Wu <jingjing.wu@intel.com>,
	Praveen Shetty <praveen.shetty@intel.com>
Subject: [PATCH 3/3] net/idpf: remove unnecessary null check
Date: Tue,  1 Dec 2026 15:25:53 -0800	[thread overview]
Message-ID: <20261201232553.2143504-3-stephen@networkplumber.org> (raw)
In-Reply-To: <20261201232553.2143504-1-stephen@networkplumber.org>

No need to check for null before rte_pktmbuf_free.
Found by devtools/cocci/nullfree.cocci

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

diff --git a/drivers/net/intel/idpf/idpf_common_rxtx.c b/drivers/net/intel/idpf/idpf_common_rxtx.c
index eb29024547..a92047b5b8 100644
--- a/drivers/net/intel/idpf/idpf_common_rxtx.c
+++ b/drivers/net/intel/idpf/idpf_common_rxtx.c
@@ -259,8 +259,7 @@ idpf_qc_split_tx_release_mbufs(struct ci_tx_queue *txq)
 
 	/* Scalar completion tags can outlive descriptor reuse, so drain every slot. */
 	for (uint16_t i = 0; i < txq->nb_tx_desc; i++) {
-		if (txq->tx_pending_pkts[i] != NULL)
-			rte_pktmbuf_free(txq->tx_pending_pkts[i]);
+		rte_pktmbuf_free(txq->tx_pending_pkts[i]);
 		txq->tx_pending_pkts[i] = NULL;
 	}
 }
-- 
2.53.0


      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 ` [PATCH 2/3] net/octeon_ep: " Stephen Hemminger
2026-12-01 23:25 ` Stephen Hemminger [this message]

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-3-stephen@networkplumber.org \
    --to=stephen@networkplumber.org \
    --cc=dev@dpdk.org \
    --cc=jingjing.wu@intel.com \
    --cc=praveen.shetty@intel.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