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 12616A04AD; Mon, 24 Jan 2022 18:50:37 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 26D8A428B8; Mon, 24 Jan 2022 18:48:04 +0100 (CET) Received: from mail-pj1-f53.google.com (mail-pj1-f53.google.com [209.85.216.53]) by mails.dpdk.org (Postfix) with ESMTP id 139FA4286A for ; Mon, 24 Jan 2022 18:48:00 +0100 (CET) Received: by mail-pj1-f53.google.com with SMTP id s2-20020a17090ad48200b001b501977b23so16477307pju.2 for ; Mon, 24 Jan 2022 09:47:59 -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=llBygSanMW5E+5xDHm7JWnwIOrSI9+QEhb8JdIMleRw=; b=cIapio6lRP9Zz+bkWfUHGGnXVV5QTOGDwfatzSrT67G0K28mo7jEJnjk17cU7SxDV1 +bEII3dDzLEIf+iuG4Qa6Rk6Ykb4jrQmWmAbqHZConIWy3Fc29tUPpIF76fL2hymYc69 erkPgmQaWvr15xfOdWF2azUKRvhS9OIr3LNQusA14YmYXDQ0f15QmWKIpWT0Q4a38QJB fnslc/bQIZI/t3b9RzE2TakWFsQpZCUNp1D5VX7enPbLsuB+zj3MpOg+AhQSV8JFPdVz CpKz2GL9vBQ4+9NxA7nPXrp0uEGpokhczNuLKEbhqGa9Pdr8nVwAkfumMwSktUI0DETG Ufgg== 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=llBygSanMW5E+5xDHm7JWnwIOrSI9+QEhb8JdIMleRw=; b=kEQeajRXJJTjm4LZ8sgQML4FMe3FWLo+BF3L+0onLGe+lyXfKr1PNGsuaEQhsQPKgq 9irnI7O5ZFfDy5hZN5o4MJ9/FntC0trMedpvruusn2VuUpVjN+156HTxRQzZrqRTQfhJ u8a+9LqIssVdh7FySNdst+ykvlY0DsLRJ4vTTPr1rkwHYXvQZqLERSnfBILIJQu9u7wT qAt984MJBsWDb5BPwvK+gmMluJUEILFKHBJPXUkM4foO+jc5NJneEyA1mRTAA+izpT52 4p4bLhe0zxN488i3vxp8XAokhns0IG+ZWqxRkbY1kRKwkZJfb3tXudYmpe2oQir96t8a sG2A== X-Gm-Message-State: AOAM530LH+u3rIkdmaPUZMoPSIuplILOTcOl/KtlHm7+dp5GCgUqwr/z Fs4WFGuDrpgmUUdOo/UJU9C6R8Bzi0qWuA== X-Google-Smtp-Source: ABdhPJw8WYovNPpqkwr77UvFidBSTdVrZTbRl29ENoM9/UYPdl/Y48Sa4YMyCZBIBZymjIGQjQfQNQ== X-Received: by 2002:a17:902:ce91:b0:14b:42a0:8adf with SMTP id f17-20020a170902ce9100b0014b42a08adfmr7982075plg.1.1643046479080; Mon, 24 Jan 2022 09:47:59 -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.47.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Jan 2022 09:47:58 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Declan Doherty Subject: [PATCH v2 34/83] crypto/null: remove unnecessary NULL checks Date: Mon, 24 Jan 2022 09:46:30 -0800 Message-Id: <20220124174719.14417-35-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/crypto/null/null_crypto_pmd_ops.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/crypto/null/null_crypto_pmd_ops.c b/drivers/crypto/null/null_crypto_pmd_ops.c index a8b5a06e7f4e..90a675dfffe0 100644 --- a/drivers/crypto/null/null_crypto_pmd_ops.c +++ b/drivers/crypto/null/null_crypto_pmd_ops.c @@ -135,8 +135,7 @@ null_crypto_pmd_qp_release(struct rte_cryptodev *dev, uint16_t qp_id) if (dev->data->queue_pairs[qp_id] != NULL) { struct null_crypto_qp *qp = dev->data->queue_pairs[qp_id]; - if (qp->processed_pkts) - rte_ring_free(qp->processed_pkts); + rte_ring_free(qp->processed_pkts); rte_free(dev->data->queue_pairs[qp_id]); dev->data->queue_pairs[qp_id] = NULL; @@ -241,8 +240,7 @@ null_crypto_pmd_qp_setup(struct rte_cryptodev *dev, uint16_t qp_id, return 0; qp_setup_cleanup: - if (qp) - rte_free(qp); + rte_free(qp); return -1; } -- 2.30.2