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 A6F89A04AD; Mon, 24 Jan 2022 18:53:00 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8F38242961; Mon, 24 Jan 2022 18:48:33 +0100 (CET) Received: from mail-pf1-f177.google.com (mail-pf1-f177.google.com [209.85.210.177]) by mails.dpdk.org (Postfix) with ESMTP id 62344428D0 for ; Mon, 24 Jan 2022 18:48:30 +0100 (CET) Received: by mail-pf1-f177.google.com with SMTP id v74so13429222pfc.1 for ; Mon, 24 Jan 2022 09:48:30 -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=aM7tNyASPlh+DnGyAiA3m15Y+BufQ2gncxDDkMNTg48=; b=J0gx84RziL88YGt3wf5FAQ2c0Z7Q7r28Qn0LNtq+gAcs7B37oDAXTNs1l7TDmU3YFe RWZe89Z/MjDpxLN2dch4m8cvQVf93KV/J24zfatzObiwL85pkRTFEZYrXaoZ1WYiZYVf xfguq7qEdsEMinDswlffeP1J8bfvk5MBg3FttJ7Ln6dRk7K6MMP00U0f+ASnRlwjHAg1 7dN01q3FRafhUQ9J81wVFV/BM5F/sB+eHe0gPyUflX1cjM4iYz/+Q12DIriG/BG3LJsS kKvBJkWmO5ePcyCZYezSU0woe1LolLjmUgPKuATH3+wbv/CnKaBNZ5IX0m9Ck+2AX/LJ 78mw== 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=aM7tNyASPlh+DnGyAiA3m15Y+BufQ2gncxDDkMNTg48=; b=lCGqHOm5e+vZOqzUvqfQX08MH1crpjovHfYbmacTq+G71mKaU3+LjHTRQ6MZEILRuG H9hGER7vB7LDhe9XAcVoK0TrXEuCgjCJZfwnR+V2ZjjB83wvoHz67+lAi/+yOZ+jdcAX T59yDI3GSP/HLS5fUO7XhyyldQOldPJAE4UnkTbaXK9/ALcT25nt06eGlPl6R1dIWqaU 5X+zRdgCw5vP1AnV+VYKJ/Rs4ByIuTpjVp9IR/smRtNvu2wWj97lwsvobBeehx03rqpC uTlgOibKVwSFAT62GldeC2pthKlDc8N6i9OxOKfOvaSO51zh4dj1tE4mG74iP2Ae2b5a pj5A== X-Gm-Message-State: AOAM532IMtziV6ZDOiX/FZYykMcBQbbUz9YgzERDGBBMrOuGNudIQFMo PUDuf503Kl8Hyek3OzJY3q97ECU37JO4xg== X-Google-Smtp-Source: ABdhPJyY6Wp0Gv9E7LulxgHlYSvuCFefINqh0bMvrrf0WWRwMJrIYB3flJZB2ksxMF/f01QKo3vtaA== X-Received: by 2002:a05:6a00:853:b0:4c0:3e77:22ea with SMTP id q19-20020a056a00085300b004c03e7722eamr14900972pfk.74.1643046509328; Mon, 24 Jan 2022 09:48:29 -0800 (PST) Received: from hermes.local (204-195-112-199.wavecable.com. [204.195.112.199]) by smtp.gmail.com with ESMTPSA id q7sm15835082pfs.37.2022.01.24.09.48.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Jan 2022 09:48:28 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Harman Kalra Subject: [PATCH v2 62/83] net/octeontx: remove unnecessary NULL checks Date: Mon, 24 Jan 2022 09:46:58 -0800 Message-Id: <20220124174719.14417-63-stephen@networkplumber.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220124174719.14417-1-stephen@networkplumber.org> References: <20220124000518.319850-1-stephen@networkplumber.org> <20220124174719.14417-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/octeontx/octeontx_ethdev.c | 3 +-- drivers/net/octeontx/octeontx_ethdev_ops.c | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/net/octeontx/octeontx_ethdev.c b/drivers/net/octeontx/octeontx_ethdev.c index b47472ebbd93..f5ea9de8efe5 100644 --- a/drivers/net/octeontx/octeontx_ethdev.c +++ b/drivers/net/octeontx/octeontx_ethdev.c @@ -1037,8 +1037,7 @@ octeontx_dev_tx_queue_setup(struct rte_eth_dev *dev, uint16_t qidx, return res; err: - if (txq) - rte_free(txq); + rte_free(txq); return res; } diff --git a/drivers/net/octeontx/octeontx_ethdev_ops.c b/drivers/net/octeontx/octeontx_ethdev_ops.c index 6ec2b71b0672..0b22e28a5625 100644 --- a/drivers/net/octeontx/octeontx_ethdev_ops.c +++ b/drivers/net/octeontx/octeontx_ethdev_ops.c @@ -108,8 +108,7 @@ octeontx_dev_vlan_filter_set(struct rte_eth_dev *dev, uint16_t vlan_id, int on) if (rc != 0) { octeontx_log_err("Fail to configure vlan filter entry " "for port %d", nic->port_id); - if (entry) - rte_free(entry); + rte_free(entry); goto done; } -- 2.30.2