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 C3AF8A034E; Wed, 9 Feb 2022 20:20:51 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A2D6242706; Wed, 9 Feb 2022 20:18:23 +0100 (CET) Received: from mail-pf1-f173.google.com (mail-pf1-f173.google.com [209.85.210.173]) by mails.dpdk.org (Postfix) with ESMTP id B8C7D42701 for ; Wed, 9 Feb 2022 20:18:22 +0100 (CET) Received: by mail-pf1-f173.google.com with SMTP id 9so3091866pfx.12 for ; Wed, 09 Feb 2022 11:18:22 -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=RUAHCuIjrS4bJ0D4n3tIMvkufhMaSey+ZbA8SStqNqk=; b=z8R29s5C0iVGjh6anj/GYkn14ew9SBQPJ6l2qHOCVSXyb+64o9QjVnfKXRRzlf4pnA 4jo+arJyzpZe6b0d6+CQVub2mPR+FxoNfzphPVNKDyYIHv/ZQ8Av7Js/SMyNKg1XqWWR a2MCR6albHBcMZ621iX885U+JECIFCMh/GHD0S+aVZkuPnR57uGYkOPb05+Aqn9sHo6V 8+BtoFqMUnUTV5hjQLx2ggbUm6GIKz3W31qftHtVXAfj1zGm/1F+D+PsMPmkjpezJkeP 52G+sKCUQPByBlU8B6aaSQ4nFt9ispkBH40ZbWc3qBGKaHKPxlbv1mHx+F2of5Qu6Qx6 c0QQ== 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=RUAHCuIjrS4bJ0D4n3tIMvkufhMaSey+ZbA8SStqNqk=; b=6RGYDvEV0BIdwsdew22BOwqQqGRLzgIUKTLC3vI1EIAFWttaSwTqGYRxo3JFHPFAzZ 8jzU427Lnz41PMq2TRolNbKQUPoCqbVlO2dDKuUDYdagwztnIa7yEqCBWm9TTrmN7gys hiJzo0f9fbHdZFdte7HI4FyfdMEpiTJfhU2mUS2utt554MTBYgTyCJ0/a9VZA7t4txsJ 9WWFCpfKOkXhwFLnQLPVlm8DySXeXajiIr19wmOtpcouO0MHldCWOe12dmNoniV/C1pM 4nihBuUElvPK77uuuS7RIdXDT9GAP7vREg48yBhitq8l6WewWExEG7fsoscL/M7EkBwU lV7g== X-Gm-Message-State: AOAM533Gec0J3Jynp/ANRdRHKlKValUg9sNnZdj7lIPdlNGeKJFxtbYC g/jsNHg4xSqDH/ci3+hKkXOx26a3SBN01731eXk= X-Google-Smtp-Source: ABdhPJyelfgkEMDRDJuYKItfWVn/KQTbYinOa9pmAsnOiWIwzMi3LwrscOmiCSOtYZ3nA0MpgWuK8Q== X-Received: by 2002:a05:6a02:18f:: with SMTP id bj15mr2275175pgb.603.1644434301689; Wed, 09 Feb 2022 11:18:21 -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.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Feb 2022 11:18:21 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Long Li , Stephen Hemminger Subject: [PATCH v3 25/36] net/netvsc: remove unnecessary NULL checks Date: Wed, 9 Feb 2022 11:17:37 -0800 Message-Id: <20220209191748.377729-26-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 Acked-by: Long Li --- 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.34.1