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 0BA70A034E; Wed, 9 Feb 2022 20:20:59 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D7D2F42712; Wed, 9 Feb 2022 20:18:25 +0100 (CET) Received: from mail-pj1-f54.google.com (mail-pj1-f54.google.com [209.85.216.54]) by mails.dpdk.org (Postfix) with ESMTP id F20E442709 for ; Wed, 9 Feb 2022 20:18:23 +0100 (CET) Received: by mail-pj1-f54.google.com with SMTP id a11-20020a17090a740b00b001b8b506c42fso6172066pjg.0 for ; Wed, 09 Feb 2022 11:18:23 -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=pTfmac4XpFxNXzZl25WLXKoRAnTtnPKBFG0S666eXVA=; b=edzIt0SXURL2StpZffqcYuynwrqTwgK9jMn+aC2wTYTWkWRs3Q5FWO6P1E0j+bCA+C VAHAG6VIFMYJVUU3SvOMeMk0UTfr+JejvtaVQ/LtRpxlwtEiLJg3XjUpy9mxDCWqKMrz EUiQ4lj5VilP9bg2Qo8tX63r+mLLWl0blivYebLeYAI6E2a6NsTbBD/JFmqaSaH50cLF WZBiF4r7kizjESe+IB8HzWdWmv6tKmu7mcGEGhTqB2XBv9GevYaMMXavxmvWYucXeRfn UjlmHy+/h+/tW1+G4Y9xmnIIFs1uNPiLMXnyF0o9h5uP45E3QVT0uqv1es0fZOgJP6pL ziiQ== 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=pTfmac4XpFxNXzZl25WLXKoRAnTtnPKBFG0S666eXVA=; b=O6L2TWrAVs8ftq5jzNMFLzjccbCCzbrqYlX5n2g6tzRYzK6H8aO1s3RX+1ZJe2HvYH gr8B2i2/QMiMtdZ0N/w28dEKL0Q/0U5Y+/maK3Oqi5UH7qECTnuX3zMH2BPE13ssuBf6 CtBhByhbHpGZVVr4TiVIeIzAIP2pFlxE57Vm4QkpNZ6VIsPW0VMcKYbiuvuE9X+YNedt QIxIO9iXAyzNEIIjVBZGGDAy0Hq9ZdyI06eze/fUKEEzadoOWmJEBT/7Wib6YowVNqO1 qTNhH/D/cFYL9/FpEgEJB+hE4JPrT4SawGKhgM8MG91Qw3sHEOO/DG4dO1L6TdbZjlDJ UYnQ== X-Gm-Message-State: AOAM530bYeMntuXveILXcerTyiehbBRjpbgHQ2KMTaoORTrmyPTqzMKe 2auLYb80ZAl8J3i056jYRGa6ncRHBJqEk7nxZl0= X-Google-Smtp-Source: ABdhPJxgY9Bqi/CyAavnjgjPilq1wkjGcGRLKp0+KsPNvgIiyPLITXY0RSgZAj5J7Qy4qJuaMw7M9A== X-Received: by 2002:a17:90a:7844:: with SMTP id y4mr5049106pjl.13.1644434302857; Wed, 09 Feb 2022 11:18:22 -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.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Feb 2022 11:18:22 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Harman Kalra Subject: [PATCH v3 26/36] net/octeontx: remove unnecessary NULL checks Date: Wed, 9 Feb 2022 11:17:38 -0800 Message-Id: <20220209191748.377729-27-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/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.34.1