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 1EAB0A04A6; Mon, 24 Jan 2022 01:10:51 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2F4C0428FE; Mon, 24 Jan 2022 01:06:31 +0100 (CET) Received: from mail-pf1-f182.google.com (mail-pf1-f182.google.com [209.85.210.182]) by mails.dpdk.org (Postfix) with ESMTP id 5EE2C428E7 for ; Mon, 24 Jan 2022 01:06:26 +0100 (CET) Received: by mail-pf1-f182.google.com with SMTP id e28so9786309pfj.5 for ; Sun, 23 Jan 2022 16:06:26 -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=UXimnap9R6M54YseHO4lTZ0QYwas3be+xIChpOE5GCV/4tNZb/DkJtqccPnTlli+BY rqcEM+gAiE3g1fR0tesC2BFjT2MHe1jXZn4kLemsddpEIs/15SwPMR9MaD0dAeKs2RrU BqkMyBjOJYCa23OMzxdcd6sKLhkkqtolI6IymHrD4Sgm9S7LTz3LEAP/+vSMXsTSxv64 lpGy2V2bA+KMrr2j5KLrW7l85i/gVAoMezVadS1r2U9iovJ4AtoFpB1hjtZUPRiBrSS2 deBgwvjhYYObqtFXd3VexmCJojVKwzJad/0QegXCHgYKAd9c5NB36dGoJr4YxmETfNgU OG2g== 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=E47cyS2wg/0Y2sLfxM5fy/PhkEhRNUuQ4xP5XEu4UDlgphv2pSEozy1dsFhHMiGBa1 YSw7r5lwJD+Jf9sxnkaTVUFdDwqFbxMc3/cQkQSoURPF2hpZbh2TE9vxLPfjQCipNrVR xrbDU8YBxZY7xlSpVshupfCIOfzqZ1puOXDufc2XIhiPFFYCJly21yEVVkNVwKogitL7 sttX87tOB7SWmZ30mobu7Xt/1nTdRxVjdLHFpG5+2OpieIFQXT/BK09UNHKq6XPTdGZ9 Y4HnFJVhoAbbScEYJ7VPKdkrS9RrRPbGZxfvX/mLSSU9ONjQJjoNBed8QCgrMlFZ7OLo Jg/g== X-Gm-Message-State: AOAM530rFWh/WAbO5cuUceGqwv5K1KX56ei0xLEX/pHhKhaZVIlv7VXS lih+3CDw6fbseRipD5IJwNJBeyhfrD7+Gg== X-Google-Smtp-Source: ABdhPJwYBqn2WBaAkSXhWHJeMLaymuJm5PloJ4O3CFu61BG5/wPV9LfymTDv+HlihwPQjKOKMN6hLA== X-Received: by 2002:a63:8b42:: with SMTP id j63mr8523766pge.501.1642982785347; Sun, 23 Jan 2022 16:06:25 -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.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 23 Jan 2022 16:06:24 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Harman Kalra Subject: [PATCH 61/82] net/octeontx: remove unnecessary NULL checks Date: Sun, 23 Jan 2022 16:04:57 -0800 Message-Id: <20220124000518.319850-62-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/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