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 DBA69A034E; Wed, 9 Feb 2022 20:19:38 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 810CA426D2; Wed, 9 Feb 2022 20:18:11 +0100 (CET) Received: from mail-pf1-f178.google.com (mail-pf1-f178.google.com [209.85.210.178]) by mails.dpdk.org (Postfix) with ESMTP id 84D184121E for ; Wed, 9 Feb 2022 20:18:09 +0100 (CET) Received: by mail-pf1-f178.google.com with SMTP id u16so283960pfg.3 for ; Wed, 09 Feb 2022 11:18:09 -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=bkqDrPU2voC8Oq9XCxzhPv6RYt2rV6h3c26xZ7qBn6Q=; b=S64X7LNSF5yPhjd9+LKREm+Wg6q1ThycZMdBLhJmtLDwNClAm0I5p5HFQjhXLZMHcG Qkvo7Oyx6LYNJ/ERxNOzOtVPO3shC6ETYnOJy+jRGflXuoLrSnbNP2tUzucYJ2zWlNjr sbPXfHZeRqHbbeu/APeYZRLYVMRwpabamkKF1AFuLiYQ8IpI85zcAhAPOL2FNP1KgeKd FGF7emlgrFdWkUEIqjWcR0260Y0p8MGOKU9/wRIhVW1xdYzIBweoL13gqm349iMXJtAN +ewTy6sqhpZJsugftHvqRgt5xDYuEypYCFk8rZSKt2IL8anQA+Z23N71SKLN3hAzBfhj oPWQ== 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=bkqDrPU2voC8Oq9XCxzhPv6RYt2rV6h3c26xZ7qBn6Q=; b=DFRbWAmMwgpv5HP6kkMars/dsDB/BmV5ZGVmGD/4w7jUoIpJIj/bnkvxwU5AOjOxtY fgnfrbOJR2oUXxw0inzdyKSKJiZWC2TcVE/UIr+DbKDSxzMRQ/rFi4NBTU2PN7hgljpP I9grCR+5dt3pxVFlb4sIBmtZXBzLcNhrkncTfqDgHo5+0BoVORAmxWBLzltph4dCF8D3 /zu53w/W3c93GzYifCdvaHi7ey8IBlDcR2t0EY0I7t24E2JG1cY3n3g22mXHuAQlxx0A JC2GLe8YQr20G5bvdy4QP3ZjDd+yufib7V5nPjnjUpxKT0ftSniwii2chnImsYGa37xl dqzQ== X-Gm-Message-State: AOAM533pYswjmoGsaP28/mOopzD8u7KZHsTXQ6InnxTeXl9khsVlqPkd cqwQ1C/OmjitKwAwwgmPeqbUq+VV+c/CIxpC X-Google-Smtp-Source: ABdhPJyN7pzNH1cqRKzvPu/WmOfBiNntUBczHfxBnxbB2Gc1q5A5zmoujbeNCnYWB/z/LaMisjqscg== X-Received: by 2002:a63:8a4a:: with SMTP id y71mr3017986pgd.587.1644434288478; Wed, 09 Feb 2022 11:18:08 -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.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Feb 2022 11:18:07 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Chandubabu Namburu Subject: [PATCH v3 14/36] net/axgbe: remove unnecessary NULL checks Date: Wed, 9 Feb 2022 11:17:26 -0800 Message-Id: <20220209191748.377729-15-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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Remove redundant NULL pointer checks before free functions found by nullfree.cocci Signed-off-by: Stephen Hemminger --- drivers/net/axgbe/axgbe_rxtx.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/net/axgbe/axgbe_rxtx.c b/drivers/net/axgbe/axgbe_rxtx.c index 6bd41d3002bf..f38bb64fab6b 100644 --- a/drivers/net/axgbe/axgbe_rxtx.c +++ b/drivers/net/axgbe/axgbe_rxtx.c @@ -22,8 +22,7 @@ axgbe_rx_queue_release(struct axgbe_rx_queue *rx_queue) sw_ring = rx_queue->sw_ring; if (sw_ring) { for (i = 0; i < rx_queue->nb_desc; i++) { - if (sw_ring[i]) - rte_pktmbuf_free(sw_ring[i]); + rte_pktmbuf_free(sw_ring[i]); } rte_free(sw_ring); } @@ -507,8 +506,7 @@ static void axgbe_tx_queue_release(struct axgbe_tx_queue *tx_queue) sw_ring = tx_queue->sw_ring; if (sw_ring) { for (i = 0; i < tx_queue->nb_desc; i++) { - if (sw_ring[i]) - rte_pktmbuf_free(sw_ring[i]); + rte_pktmbuf_free(sw_ring[i]); } rte_free(sw_ring); } -- 2.34.1