DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] pipeline: fix dead code
@ 2021-10-27 22:15 Yogesh Jangra
  2021-11-04 17:05 ` Thomas Monjalon
  0 siblings, 1 reply; 2+ messages in thread
From: Yogesh Jangra @ 2021-10-27 22:15 UTC (permalink / raw)
  To: dev
  Cc: cristian.dumitrescu, venkata.suresh.kumar.p, yogesh.jangra,
	harshad.suresh.narayane

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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-11-04 17:05 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-27 22:15 [dpdk-dev] [PATCH] pipeline: fix dead code Yogesh Jangra
2021-11-04 17:05 ` Thomas Monjalon

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).