From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 3AE33A0C45; Thu, 28 Oct 2021 07:26:27 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id CDEC74067B; Thu, 28 Oct 2021 07:26:26 +0200 (CEST) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by mails.dpdk.org (Postfix) with ESMTP id 64EF64003F for ; Thu, 28 Oct 2021 07:26:25 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10150"; a="230274992" X-IronPort-AV: E=Sophos;i="5.87,188,1631602800"; d="scan'208";a="230274992" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Oct 2021 22:26:24 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.87,188,1631602800"; d="scan'208";a="537864765" Received: from ena-4.iind.intel.com ([10.190.200.151]) by fmsmga008.fm.intel.com with ESMTP; 27 Oct 2021 22:26:22 -0700 From: Yogesh Jangra To: dev@dpdk.org Cc: cristian.dumitrescu@intel.com, venkata.suresh.kumar.p@intel.com, yogesh.jangra@intel.com, harshad.suresh.narayane@intel.com Date: Wed, 27 Oct 2021 18:15:54 -0400 Message-Id: <1635372954-112660-1-git-send-email-yogesh.jangra@intel.com> X-Mailer: git-send-email 1.8.3.1 Subject: [dpdk-dev] [PATCH] pipeline: fix dead code X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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 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