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 F1941A04A6; Mon, 24 Jan 2022 01:08:27 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4489D4286B; Mon, 24 Jan 2022 01:06:00 +0100 (CET) Received: from mail-pl1-f174.google.com (mail-pl1-f174.google.com [209.85.214.174]) by mails.dpdk.org (Postfix) with ESMTP id 0693342859 for ; Mon, 24 Jan 2022 01:05:57 +0100 (CET) Received: by mail-pl1-f174.google.com with SMTP id u11so13911956plh.13 for ; Sun, 23 Jan 2022 16:05:56 -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=Nden/EbwKZS0mWwlZXiEWCAGhp0UdvI/FvyhMEWnPFv6xw96OYwrabMVqklhLeezpm CAO/y3D9ch1TvQvtlj0N4EGDnoxJd1Bksc6uuDPbqhW2DnYnu5E0iZfqc5xGsFR9N0lc XbH3IZuA4Yq3/v77o4BfpzBRkp/3jYTHdPkY7ezzXJnWKhsQn/TOkhkRw2kDVr7vX1B8 1lat7VVnRO/cNhOw/GzzT/gyYO7HQiics6vVrmAdQ88UHu/QlT0dyi1Arvc74tTStpMf gIxbneYgUsD/bfSmEG1ZhgFFhXrqHljLX5taFLrdQUxineKYTPXLUP1NwgSwE9iAlc0i vPDw== 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=eXTWHEjSjvEo/TsbgF5/fDlSl3yG+h3SdZZgA8UBw7fwR74WqopQEIFtK8QJlER/MA LRnKg8SEqQ+E6dVvJzr4pNEsmQ13ZHTGFGQQcV8qfeHrBPztNY9AvE9/7gCZXOIvPRvr PB4j/81FuoRBz1d+MXSLfs7mMnQ8fJhFQiV7E0l3FKMPvY4Qw5aVZJm+azoz2vIh26tX dOLSZZ+iQG2rxxpqafUKlluEOstxA5bZMzifVL8rkj3qJXo7Ap/dJfCrjeo++oQCpi9A 5wOiEbRWK4EB3m9jjC8RjnCwRSkPY5SYgFZKGZRQrU6ZvEjAvKXrQti8FJdTo5ELQNfV 6KTg== X-Gm-Message-State: AOAM531N2PDOV1okC9btMg6w6nxxZXyP7txOrZPxmLq3BssTR9rKENeq tDKPf5md7m+8ZYLTfy2+CNB2/4zZvdaZNQ== X-Google-Smtp-Source: ABdhPJxdHQZyuHIuxr5MFwUGNoCnNHLx343ykcqa+FoxbNDuuM+JH5wTGsmaehnPRUEcEMJw7RyEmQ== X-Received: by 2002:a17:902:ab09:b0:14b:2640:6432 with SMTP id ik9-20020a170902ab0900b0014b26406432mr9478519plb.45.1642982756056; Sun, 23 Jan 2022 16:05:56 -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.05.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 23 Jan 2022 16:05:55 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Declan Doherty Subject: [PATCH 33/82] crypto/null: remove unnecessary NULL checks Date: Sun, 23 Jan 2022 16:04:29 -0800 Message-Id: <20220124000518.319850-34-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/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