From 2ce3ccbe442eac130f53995fc69dac666fc175fa Mon Sep 17 00:00:00 2001 From: Yogesh Jangra Date: Wed, 27 Oct 2021 18:15:54 -0400 Subject: [PATCH] pipeline: fix dead code Fix minor dead code issue reported by Coverity. Coverity issue: 373653 Fixes: e9d870 ("pipeline: add SWX pipeline tables") Signed-off-by: Yogesh Jangra Acked-by: Cristian Dumitrescu --- 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 1afaffefd4..534f2f551c 100644 --- a/lib/pipeline/rte_swx_pipeline.c +++ b/lib/pipeline/rte_swx_pipeline.c @@ -7387,7 +7387,8 @@ rte_swx_pipeline_table_config(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)