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 73B32A04A6; Mon, 24 Jan 2022 01:10:41 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6466E428E9; Mon, 24 Jan 2022 01:06:29 +0100 (CET) Received: from mail-pf1-f170.google.com (mail-pf1-f170.google.com [209.85.210.170]) by mails.dpdk.org (Postfix) with ESMTP id 39381428DF for ; Mon, 24 Jan 2022 01:06:24 +0100 (CET) Received: by mail-pf1-f170.google.com with SMTP id e28so9786256pfj.5 for ; Sun, 23 Jan 2022 16:06:24 -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=Gr9VBJf1wriPszZUgTxGzBXtWstZYad04nolY1GAl+k=; b=a5oMhYXkWxs/5CpiZdNGt4d4fewjf35rewQRjNBBDBzamXof4YE3FG+60Rio6Hs4rx ioX/vIY0NswdESeStJq9I0TUT/7Z0tsnpt9dc1KAH51D3tcvLLHmLlCpqQtJs05Y8ld5 TZkyeogqck1/p8i2272ZqeCZyS683qxolufgTQyu+ahkJsnyCjLOy3xZNUokil6SO3ap sK0HtPWkySrK4p3KeUiX3q/42yGBsbdXI4TG5Fge88eVTl4y83MCN4ILheOo3iOOb6Cb elUUzEE4EJGdpLrFzbQTQvGbbDBnwQj87D4svewfXO9v6sfyTX16zVgw/rU5YxPTc4SP zFaw== 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=Gr9VBJf1wriPszZUgTxGzBXtWstZYad04nolY1GAl+k=; b=SXNu2asfwvoEKNOLOEt/q0B7yashvcOk+/73pyTVV0lCZJCVB2/wPJObf/5HsdbUJq M9++qdwvo9XgZYPt6/qI/Gw/OMvf/DGX8eIQ7TjUtw7S0P9M8My8QHmlP3r1hraigauV TEOD/3SaKMBnyLn+s24QmbV5+XsSMfOuKUiCCLzqdJN4iRCl4Nxg9QvCZY8fdIlCaD79 Bih5FQ8rK/BOv75ZYfsmPXzzhBgZse5rqPpH7fLbAo8D3xSGobtsu+mpl/9kNAKj5seo x0OQvDofF/w8HFqaxJ6xrNfCWN17FGmhLWlU1yLoM1eF6fharWLoJXW84HBo9d+GZMyI 5xig== X-Gm-Message-State: AOAM531N4zFl2Yf0MeOxGLzyyCRx0csuql6pSwNxDxFHK1lKwryFW4KJ 1h0Tcl/wf3kFzb0Wiol2Ia6HeVOSWItOgA== X-Google-Smtp-Source: ABdhPJzZ3toT8XENrhqIytxRNEMHNtanwWgo6X4pu2OosBBLjHNPKyAlkSrMqnCyN2tdFOUXlkPzPA== X-Received: by 2002:a63:4f0c:: with SMTP id d12mr10148557pgb.133.1642982783202; Sun, 23 Jan 2022 16:06:23 -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.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 23 Jan 2022 16:06:22 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Stephen Hemminger , Long Li Subject: [PATCH 59/82] net/netvsc: remove unnecessary NULL checks Date: Sun, 23 Jan 2022 16:04:55 -0800 Message-Id: <20220124000518.319850-60-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/netvsc/hn_rxtx.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/net/netvsc/hn_rxtx.c b/drivers/net/netvsc/hn_rxtx.c index 50ca1710ef3e..3e3488f1b87a 100644 --- a/drivers/net/netvsc/hn_rxtx.c +++ b/drivers/net/netvsc/hn_rxtx.c @@ -315,8 +315,7 @@ hn_dev_tx_queue_setup(struct rte_eth_dev *dev, } error: - if (txq->txdesc_pool) - rte_mempool_free(txq->txdesc_pool); + rte_mempool_free(txq->txdesc_pool); rte_memzone_free(txq->tx_rndis_mz); rte_free(txq); return err; @@ -365,8 +364,7 @@ hn_dev_tx_queue_release(struct rte_eth_dev *dev, uint16_t qid) if (!txq) return; - if (txq->txdesc_pool) - rte_mempool_free(txq->txdesc_pool); + rte_mempool_free(txq->txdesc_pool); rte_memzone_free(txq->tx_rndis_mz); rte_free(txq); -- 2.30.2