From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 06C2EA04BC for ; Fri, 9 Oct 2020 14:39:18 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id F29901D5F9; Fri, 9 Oct 2020 14:39:16 +0200 (CEST) Received: from huawei.com (szxga05-in.huawei.com [45.249.212.191]) by dpdk.org (Postfix) with ESMTP id 2085D1D5F9; Fri, 9 Oct 2020 14:39:15 +0200 (CEST) Received: from DGGEMS404-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id 1C46D6E8D0E568E22120; Fri, 9 Oct 2020 20:39:13 +0800 (CST) Received: from localhost (10.174.187.156) by DGGEMS404-HUB.china.huawei.com (10.3.19.204) with Microsoft SMTP Server id 14.3.487.0; Fri, 9 Oct 2020 20:39:06 +0800 From: wangyunjian To: CC: , , , , , Yunjian Wang , Date: Fri, 9 Oct 2020 20:39:05 +0800 Message-ID: <1602247145-14676-1-git-send-email-wangyunjian@huawei.com> X-Mailer: git-send-email 1.9.5.msysgit.1 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.174.187.156] X-CFilter-Loop: Reflected Subject: [dpdk-stable] [dpdk-dev] [PATCH v2] net/octeontx2: remove logically dead code X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" From: Yunjian Wang The glibc free allows free(NULL) as null operation, so remove this useless null checks. Coverity issue: 357719 Fixes: da138cd47e06 ("net/octeontx2: handle port reconfigure") Cc: stable@dpdk.org Signed-off-by: Yunjian Wang --- v2: fix code styles suggested by Stephen Hemminger --- drivers/net/octeontx2/otx2_ethdev.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/net/octeontx2/otx2_ethdev.c b/drivers/net/octeontx2/otx2_ethdev.c index 03d81faef..b69b92bf5 100644 --- a/drivers/net/octeontx2/otx2_ethdev.c +++ b/drivers/net/octeontx2/otx2_ethdev.c @@ -1383,10 +1383,8 @@ nix_store_queue_cfg_and_then_release(struct rte_eth_dev *eth_dev) return 0; fail: - if (tx_qconf) - free(tx_qconf); - if (rx_qconf) - free(rx_qconf); + free(tx_qconf); + free(rx_qconf); return -ENOMEM; } -- 2.23.0