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 5A781A0A02; Wed, 7 Apr 2021 12:59:49 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 17EDC4069F; Wed, 7 Apr 2021 12:59:49 +0200 (CEST) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by mails.dpdk.org (Postfix) with ESMTP id 91C214013F for ; Wed, 7 Apr 2021 12:59:47 +0200 (CEST) IronPort-SDR: DILhG1Q5D20JxzKnK0UDweTV7E+MBjJbkQ1FXVUDmJxZAwfBNtl07GN1v+XlJrHNqkNw9tk08C loJbOtBZxiZQ== X-IronPort-AV: E=McAfee;i="6000,8403,9946"; a="278547744" X-IronPort-AV: E=Sophos;i="5.82,203,1613462400"; d="scan'208";a="278547744" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Apr 2021 03:59:46 -0700 IronPort-SDR: Onf1E3uTlfbD42FtW7xwzZPOstp3j7Yt/1t4GfslwhL646gWeMq07H3PTnwNG58NpUhFqsZjqF 44QS3NJxh/Sw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.82,203,1613462400"; d="scan'208";a="415223153" Received: from silpixa00400573.ir.intel.com (HELO silpixa00400573.ger.corp.intel.com) ([10.237.223.107]) by fmsmga008.fm.intel.com with ESMTP; 07 Apr 2021 03:59:45 -0700 From: Cristian Dumitrescu To: dev@dpdk.org Date: Wed, 7 Apr 2021 11:59:45 +0100 Message-Id: <20210407105945.18064-1-cristian.dumitrescu@intel.com> X-Mailer: git-send-email 2.17.1 Subject: [dpdk-dev] [PATCH] port: fix dead code in ring 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 logically dead code in ring port. Coverity issue: 369664 Fixes: 77a413017c2d ("port: add ring SWX port") Signed-off-by: Cristian Dumitrescu --- lib/librte_port/rte_swx_port_ring.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/librte_port/rte_swx_port_ring.c b/lib/librte_port/rte_swx_port_ring.c index 4df720d91..8a076a213 100644 --- a/lib/librte_port/rte_swx_port_ring.c +++ b/lib/librte_port/rte_swx_port_ring.c @@ -195,7 +195,7 @@ writer_create(void *args) goto error; p->params.name = strdup(params->name); - if (!p) + if (!p->params.name) goto error; p->pkts = calloc(params->burst_size, sizeof(struct rte_mbuf *)); -- 2.17.1