From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <dev-bounces@dpdk.org>
Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124])
	by inbox.dpdk.org (Postfix) with ESMTP id 85729A034E;
	Wed,  9 Feb 2022 20:19:51 +0100 (CET)
Received: from [217.70.189.124] (localhost [127.0.0.1])
	by mails.dpdk.org (Postfix) with ESMTP id 54B3E426DD;
	Wed,  9 Feb 2022 20:18:13 +0100 (CET)
Received: from mail-pj1-f51.google.com (mail-pj1-f51.google.com
 [209.85.216.51]) by mails.dpdk.org (Postfix) with ESMTP id DFC66426D5
 for <dev@dpdk.org>; Wed,  9 Feb 2022 20:18:11 +0100 (CET)
Received: by mail-pj1-f51.google.com with SMTP id
 d15-20020a17090a564f00b001b937f4ae2fso799993pji.4
 for <dev@dpdk.org>; Wed, 09 Feb 2022 11:18:11 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=networkplumber-org.20210112.gappssmtp.com; s=20210112;
 h=from:to:cc:subject:date:message-id:in-reply-to:references
 :mime-version:content-transfer-encoding;
 bh=K1IBu84v3UANdzrFaVvoLzrjeFW3EWAFfH+wAU1vAKg=;
 b=OB1kKjwdpc4wOldtvNjpNIuMwmAPVMBwe8IcNSD7+wT4wXhDFEF+Ddgz43cBVt2kqW
 PF2U3TBgTaQXyOMBsrNyjrt9ucxXhA1ACMCJmeBwRBDbavHcqUI53NmFxMDsi/AxV64Z
 +h/CkE2P8v6fHXtDye6uB/n1CGUmgA48IpYGDpXjGsJEMmUg5AZLjcnj3WYN2f/VcoN1
 WDhV090pV9Aik+0huKqgMfVAurw+J9obkyd1Z3SaOpvHyy/s2xJOoIy9IFt8n3KCgWvm
 rSD58JEvYMCRcxDPw7pgbJ2QaT5s7OXu5A9AlBrpeLjZ4QW3Wb4hLjmd1SEEl0qIc8bB
 Wk8Q==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to
 :references:mime-version:content-transfer-encoding;
 bh=K1IBu84v3UANdzrFaVvoLzrjeFW3EWAFfH+wAU1vAKg=;
 b=5oVxYBj/SkyJGbdctTckKZS4+4igf50xP+dEiYpcJ40ny8Y4MsVlx/+eofZWl3WG9z
 T4iSplodvpqw7oTiqDEJH8zuXQUPN+EuJ87GBx3WRW7g6oPmLnOlwc9HbXv9bSPp/4he
 cWEkL5+0IKqBmslxHQrssgNwcBJx3e+IyPGEcUuVa81KNYknIH5T6AeZnKZvF7au8Asd
 6y2BH9N1pyZnsxRmLhL8SkK1hZLmoGzKTGUJjMS1EgA9VcYueifWYVys6IcVkP9vvZx7
 XIguQWgrQ13GqCIj5blTStUEWEChI81RIcME6jqwVfgCmrEoM49ienQYXDvcTdOyhIRk
 9rPQ==
X-Gm-Message-State: AOAM532lTZp7HrwgexioLFPYUMBdwfCHNtmAS9OTHr91h2hU5AOhyu4K
 7925PofTqO4hpMwU6sUC//wwJ3dAfZiyt+Wa9vY=
X-Google-Smtp-Source: ABdhPJzil5y/uk5FpHWud8ni8sC73bWKw5EAD48YK6cLtuWPOynapoT4qLkTuO2AD+Qrx1jCZkZ/Kg==
X-Received: by 2002:a17:902:ef47:: with SMTP id
 e7mr3556333plx.47.1644434290807; 
 Wed, 09 Feb 2022 11:18:10 -0800 (PST)
Received: from hermes.local (204-195-112-199.wavecable.com. [204.195.112.199])
 by smtp.gmail.com with ESMTPSA id
 u16sm14378401pgh.54.2022.02.09.11.18.09
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Wed, 09 Feb 2022 11:18:10 -0800 (PST)
From: Stephen Hemminger <stephen@networkplumber.org>
To: dev@dpdk.org
Cc: Stephen Hemminger <stephen@networkplumber.org>,
 Nithin Dabilpuram <ndabilpuram@marvell.com>,
 Kiran Kumar K <kirankumark@marvell.com>,
 Sunil Kumar Kori <skori@marvell.com>, Satha Rao <skoteshwar@marvell.com>
Subject: [PATCH v3 16/36] net/cnxk: remove unnecessary NULL checks
Date: Wed,  9 Feb 2022 11:17:28 -0800
Message-Id: <20220209191748.377729-17-stephen@networkplumber.org>
X-Mailer: git-send-email 2.34.1
In-Reply-To: <20220209191748.377729-1-stephen@networkplumber.org>
References: <20220124000518.319850-1-stephen@networkplumber.org>
 <20220209191748.377729-1-stephen@networkplumber.org>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.29
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

Remove redundant NULL pointer checks before free functions
found by nullfree.cocci

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
 drivers/net/cnxk/cnxk_ethdev.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/net/cnxk/cnxk_ethdev.c b/drivers/net/cnxk/cnxk_ethdev.c
index 53dfb5eae80e..945600cdaf64 100644
--- a/drivers/net/cnxk/cnxk_ethdev.c
+++ b/drivers/net/cnxk/cnxk_ethdev.c
@@ -934,10 +934,8 @@ nix_restore_queue_cfg(struct rte_eth_dev *eth_dev)
 	for (i = 0; i < eth_dev->data->nb_tx_queues; i++)
 		dev_ops->tx_queue_release(eth_dev, i);
 fail:
-	if (tx_qconf)
-		free(tx_qconf);
-	if (rx_qconf)
-		free(rx_qconf);
+	free(tx_qconf);
+	free(rx_qconf);
 
 	return rc;
 }
-- 
2.34.1