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 9C9E6A04A6; Mon, 24 Jan 2022 01:09:01 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9944942895; Mon, 24 Jan 2022 01:06:06 +0100 (CET) Received: from mail-pg1-f169.google.com (mail-pg1-f169.google.com [209.85.215.169]) by mails.dpdk.org (Postfix) with ESMTP id 07B514287F for ; Mon, 24 Jan 2022 01:06:03 +0100 (CET) Received: by mail-pg1-f169.google.com with SMTP id 133so13678115pgb.0 for ; Sun, 23 Jan 2022 16:06:02 -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=BLI65pAkl2Uesd7NXA66nH3tfFeFOpHNaRIG+fzMF3I=; b=Op7nZXJSCiJprNkPnxwVU6+YcPIoovxqdS2VG+r/J4Voda5ALl8diDaIAI9GS34XS+ yGigD7XxMrdBpz4SV2C9Q0wiyG0FTRfxw9mDYoEilMcrzBRG0h3QhxUZWjncx0JMaJyr KLqOzwDGlFWlofk29qcCf80R1/XDKMjTmOkHG+yduaq3jyfV/RdnteOoArTs+PbKE3eb o3/F4tfPd9ev6dUsHAHBH7rIsZ0ZWBFeJdl4C5kWlWvnT9fGHAFkAIJVHnUfdM9lyMmq etYcHxCgOjCN1buon1Y886VM3GRKQuLNTgpUbN7ylKoD+wtBI/bbam8JSx33VeU9cWTE Z0kQ== 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=BLI65pAkl2Uesd7NXA66nH3tfFeFOpHNaRIG+fzMF3I=; b=zMWBuegcqDA7iX+3MXCMaVYbRMIYiP/XjzSrHD5SgQ+9lt2sKScAxAXZqaqhK79tf4 r3sjwrBmrQO9p1/pnEjkJMU3Sz4vLZxXqFuo9G7lRQx1rxh3RcjGMljy+Qn0qnUovkjQ 4vB3ikfKBmTu58Iuz3j5NKNhkmQNCFtGgqaRLagEFqmN0ryWt2N+ySM5D+dUvydk8O/e zJVBv1teYNtxOyzpWCdtEybBW2eB+l4ggNvv79PQfRHGWRRNQAOfkbxqeeP1Pz4SkXd1 1AKGWQcPjt7gCUY9lzLSJj7lTQIBRYtiyfqcCQ8LcAhGcVv+eCs5xltTE9kl+QGd244p Rg3Q== X-Gm-Message-State: AOAM533MQNxknjPSzWt661YSBErGuiT4GTcR+q2CLFlAMweF/hRwG3T/ f226r2vUMVVQ+aO4ifHby/OXGpPBJtYUhg== X-Google-Smtp-Source: ABdhPJy0/yuYY6AAOQ0tRwFSwO48Ne+iH5bBCX+N9mlxJcQBt8ydmQioyVphXb+/nYYk/74SzvE8Dw== X-Received: by 2002:a05:6a00:1896:b0:4c9:6027:e847 with SMTP id x22-20020a056a00189600b004c96027e847mr2084878pfh.15.1642982761981; Sun, 23 Jan 2022 16:06:01 -0800 (PST) Received: from hermes.local (204-195-112-199.wavecable.com. [204.195.112.199]) by smtp.gmail.com with ESMTPSA id ck21sm10935350pjb.51.2022.01.23.16.06.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 23 Jan 2022 16:06:01 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Chandubabu Namburu Subject: [PATCH 39/82] net/axgbe: remove unnecessary NULL checks Date: Sun, 23 Jan 2022 16:04:35 -0800 Message-Id: <20220124000518.319850-40-stephen@networkplumber.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220124000518.319850-1-stephen@networkplumber.org> References: <20220124000518.319850-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.30.2