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 BD3B8A04AD; Mon, 24 Jan 2022 18:52:49 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id BD53442955; Mon, 24 Jan 2022 18:48:30 +0100 (CET) Received: from mail-pg1-f174.google.com (mail-pg1-f174.google.com [209.85.215.174]) by mails.dpdk.org (Postfix) with ESMTP id 268874292C for ; Mon, 24 Jan 2022 18:48:28 +0100 (CET) Received: by mail-pg1-f174.google.com with SMTP id t32so16018381pgm.7 for ; Mon, 24 Jan 2022 09:48:28 -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=E4F+V+71mbCQELNFSVEJT7iqPUH+on0SLbGzFHFKYuGj88ffKQlCpzEcI9NId8nBDv wifMmof8BwurLesqe99RQXzie3Fzwu6quGzxhYe0Kh5iJtpaUAD35BSb/ZDxBElJB88Q VwKAtCuIWbeaSacgLtPtU7zrklLCz2N/5bJA3rF2FGpRTD62YeJBouw8qH7WctxlHiIo 9Zf+xENu/tTOPppY9nNW1LU46d7RiItlZ+YiyyA/wpJ35d+dN+/khgNsMj0wFYuA+F2s WJUwsxNYkYoZdXjy0Ps8AOiXV7+R0ucWP49ARMTMyJCthJFdAYNw9TJzTaeOHor8eVcL uZwA== 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=va8I4xrQuS/nII79iorleWQvORGiNBuJ/HmH7FjRUg8nOLhocQQmqE8A5AbZImirAL BlVhi7DSJwGMRKgnbNu76zVbJhPhRiPbITiG7Vly3FUQfKKf5g6kBZJ4sIG9rs6Bll2H 0yoHQpR24VSZwkQHUGTguF4aMICzteVs5m/vPBEZjtNQSWGzgQDB0YhEKngmUts7XQBa LrYTz94f9sKog87oLfpN6dUPotCIPS8M2eMene5D3U6wB4vOKHwtq4wcUWPBtYE/Qak5 yznR1TG32u0jZaaECQi6JpcM2ywRRk6IwrpvRoyHN81kXcm/ripGDh9Y6NJPzRL1ntwU 5wCA== X-Gm-Message-State: AOAM5337hIXKd+Pw3io0eNEd2R6BfirNUYk9eMvcpl2BjRUtcBz23ho2 Rm6gAX2cb9digbxyT3qgzu4aNxy1rGopVA== X-Google-Smtp-Source: ABdhPJwBRYecEDkP+YMsY1pLXZ0EtWJUk+WibzbN7NiFdFBEhsLAKEXXKlOrgLFVBlT10wxl2OEQBA== X-Received: by 2002:a62:cdc2:0:b0:4c7:f9a5:ebc6 with SMTP id o185-20020a62cdc2000000b004c7f9a5ebc6mr8928525pfg.34.1643046507116; Mon, 24 Jan 2022 09:48:27 -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.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Jan 2022 09:48:26 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Stephen Hemminger , Long Li Subject: [PATCH v2 60/83] net/netvsc: remove unnecessary NULL checks Date: Mon, 24 Jan 2022 09:46:56 -0800 Message-Id: <20220124174719.14417-61-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/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