]> git.droids-corp.org - dpdk.git/commitdiff
pipeline: fix dead code
authorYogesh Jangra <yogesh.jangra@intel.com>
Wed, 27 Oct 2021 22:15:54 +0000 (18:15 -0400)
committerThomas Monjalon <thomas@monjalon.net>
Thu, 4 Nov 2021 15:43:27 +0000 (16:43 +0100)
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

index 1afaffefd4ee1a4239478e7744831c20ee18e573..534f2f551c394735fcbc293be5f611bf189f73aa 100644 (file)
@@ -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)