All of lore.kernel.org
 help / color / mirror / Atom feed
From: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
To: dev@dpdk.org
Subject: [dpdk-dev] [PATCH] port: fix dead code in ring
Date: Wed,  7 Apr 2021 11:59:45 +0100	[thread overview]
Message-ID: <20210407105945.18064-1-cristian.dumitrescu@intel.com> (raw)

Fix logically dead code in ring port.

Coverity issue: 369664
Fixes: 77a413017c2d ("port: add ring SWX port")

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
---
 lib/librte_port/rte_swx_port_ring.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/librte_port/rte_swx_port_ring.c b/lib/librte_port/rte_swx_port_ring.c
index 4df720d91..8a076a213 100644
--- a/lib/librte_port/rte_swx_port_ring.c
+++ b/lib/librte_port/rte_swx_port_ring.c
@@ -195,7 +195,7 @@ writer_create(void *args)
 		goto error;
 
 	p->params.name = strdup(params->name);
-	if (!p)
+	if (!p->params.name)
 		goto error;
 
 	p->pkts = calloc(params->burst_size, sizeof(struct rte_mbuf *));
-- 
2.17.1


             reply	other threads:[~2021-04-07 10:59 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-07 10:59 Cristian Dumitrescu [this message]
2021-04-19 17:41 ` [dpdk-dev] [PATCH] port: fix dead code in ring Thomas Monjalon

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=20210407105945.18064-1-cristian.dumitrescu@intel.com \
    --to=cristian.dumitrescu@intel.com \
    --cc=dev@dpdk.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.