From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <dev-bounces@dpdk.org>
Received: from dpdk.org (dpdk.org [92.243.14.124])
	by inbox.dpdk.org (Postfix) with ESMTP id D7C24A04C5;
	Sat,  5 Sep 2020 11:36:58 +0200 (CEST)
Received: from [92.243.14.124] (localhost [127.0.0.1])
	by dpdk.org (Postfix) with ESMTP id 68A3C1C0CA;
	Sat,  5 Sep 2020 11:36:58 +0200 (CEST)
Received: from huawei.com (szxga05-in.huawei.com [45.249.212.191])
 by dpdk.org (Postfix) with ESMTP id D2E311C0C0;
 Sat,  5 Sep 2020 11:36:56 +0200 (CEST)
Received: from DGGEMS408-HUB.china.huawei.com (unknown [172.30.72.59])
 by Forcepoint Email with ESMTP id E815883B2FB606413F7C;
 Sat,  5 Sep 2020 17:36:54 +0800 (CST)
Received: from localhost (10.174.185.168) by DGGEMS408-HUB.china.huawei.com
 (10.3.19.208) with Microsoft SMTP Server id 14.3.487.0; Sat, 5 Sep 2020
 17:36:44 +0800
From: wangyunjian <wangyunjian@huawei.com>
To: <dev@dpdk.org>
CC: <ajit.khaparde@broadcom.com>, <somnath.kotur@broadcom.com>,
 <jerry.lilijun@huawei.com>, <xudingke@huawei.com>, Yunjian Wang
 <wangyunjian@huawei.com>, <stable@dpdk.org>
Date: Sat, 5 Sep 2020 17:36:42 +0800
Message-ID: <9febb2607d8abb281c430142608f67881347f8f1.1599292452.git.wangyunjian@huawei.com>
X-Mailer: git-send-email 1.9.5.msysgit.1
In-Reply-To: <cover.1599292452.git.wangyunjian@huawei.com>
References: <cover.1599292452.git.wangyunjian@huawei.com>
MIME-Version: 1.0
Content-Type: text/plain
X-Originating-IP: [10.174.185.168]
X-CFilter-Loop: Reflected
Subject: [dpdk-dev]  [PATCH 1/2] net/bnxt: remove logically dead code
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: DPDK patches and discussions <dev.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
Errors-To: dev-bounces@dpdk.org
Sender: "dev" <dev-bounces@dpdk.org>

From: Yunjian Wang <wangyunjian@huawei.com>

This patch removes logically dead code reported by coverity.

Coverity issue: 360824
Fixes: 6dc83230b43b ("net/bnxt: support port representor data path")
Cc: stable@dpdk.org

Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
---
 drivers/net/bnxt/bnxt_reps.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/net/bnxt/bnxt_reps.c b/drivers/net/bnxt/bnxt_reps.c
index 6fa9a30d2..e924025cf 100644
--- a/drivers/net/bnxt/bnxt_reps.c
+++ b/drivers/net/bnxt/bnxt_reps.c
@@ -44,8 +44,6 @@ bnxt_vfr_recv(uint16_t port_id, uint16_t queue_id, struct rte_mbuf *mbuf)
 	uint8_t que;
 
 	vfr_eth_dev = &rte_eth_devices[port_id];
-	if (!vfr_eth_dev)
-		return 1;
 	vfr_bp = vfr_eth_dev->data->dev_private;
 	/* If rxq_id happens to be > max rep_queue, use rxq0 */
 	que = queue_id < BNXT_MAX_VF_REP_RINGS ? queue_id : 0;
-- 
2.18.1