DPDK patches and discussions
 help / color / mirror / Atom feed
From: Yogesh Jangra <yogesh.jangra@intel.com>
To: dev@dpdk.org
Cc: cristian.dumitrescu@intel.com, venkata.suresh.kumar.p@intel.com,
	yogesh.jangra@intel.com, harshad.suresh.narayane@intel.com
Subject: [dpdk-dev] [PATCH] pipeline: fix dead code
Date: Wed, 27 Oct 2021 18:15:54 -0400	[thread overview]
Message-ID: <1635372954-112660-1-git-send-email-yogesh.jangra@intel.com> (raw)

Fix minor dead code issue reported by Coverity.

Coverity issue: 373653
Fixes: e9d870 ("pipeline: add SWX pipeline tables")

Signed-off-by: Yogesh Jangra <yogesh.jangra@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
---
 lib/pipeline/rte_swx_pipeline.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lib/pipeline/rte_swx_pipeline.c b/lib/pipeline/rte_swx_pipeline.c
index 5e089fb..1218ecb 100644
--- a/lib/pipeline/rte_swx_pipeline.c
+++ b/lib/pipeline/rte_swx_pipeline.c
@@ -7387,7 +7387,8 @@ struct_field_parse(struct rte_swx_pipeline *p,
 
 	/* Memory allocation. */
 	t = calloc(1, sizeof(struct table));
-	CHECK(t, ENOMEM);
+	if (!t)
+		goto nomem;
 
 	t->fields = calloc(params->n_fields, sizeof(struct match_field));
 	if (!t->fields)
-- 
1.8.3.1


             reply	other threads:[~2021-10-28  5:26 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-27 22:15 Yogesh Jangra [this message]
2021-11-04 17:05 ` 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=1635372954-112660-1-git-send-email-yogesh.jangra@intel.com \
    --to=yogesh.jangra@intel.com \
    --cc=cristian.dumitrescu@intel.com \
    --cc=dev@dpdk.org \
    --cc=harshad.suresh.narayane@intel.com \
    --cc=venkata.suresh.kumar.p@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;
as well as URLs for NNTP newsgroup(s).