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 D5C7FA04AD; Mon, 24 Jan 2022 18:50:46 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 222FF428A7; Mon, 24 Jan 2022 18:48:06 +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 F127B4280A for ; Mon, 24 Jan 2022 18:48:01 +0100 (CET) Received: by mail-pj1-f53.google.com with SMTP id d5so14722813pjk.5 for ; Mon, 24 Jan 2022 09:48:01 -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=hETS2FMWtkgnpp1IU7jhzCtiLY7P91TgJUmKY6LlPVg=; b=TAgEKcTO9jNmCu7fv5ayxqyGpar+oQ0Zu6+KUEWnT53kSDAXvNNLQKIx+s+iAdUsn0 pkEJ+xyadRMJ/tklX/LZCXMLZ9lpxUa5beccbaAKJRjz3A62ErS3pEjxheKqQeEQHyN8 ZAGE0qgrva9HkAXFGpWLQ1C/ueOAfSsBrKfARmwBENhZJWjfGumrm/70d17rSwVa5c44 lY7mwVULcxd32+zaSlp6p/K18fiUlkyeyFoJ3ZEYMT+EmQP6P7qm0Og7cNGzg6zOwFwO FK0IFQf0RpjaWqaaQPnrCGM+xzY0Hh1psbw/FLabNIqTRFVyARuNmq/8RnFc7FwczZR+ 4l/g== 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=hETS2FMWtkgnpp1IU7jhzCtiLY7P91TgJUmKY6LlPVg=; b=IXOro2vcd/vYAcT+jfORREvydl5ta3310E47Ekz8voXgLDRWYaW2XaI/MD0Qfn6LK6 76ffM1fB4Azgkbzfl1isFHUDU3Z/NMsr3tMiHqelLSYDkJAIyIpcK9MxAMRplk+3OmOD eOCwWT2otle0U8v5rXgPg8SYhj9+vW+08G0mfcdjrcImH92i/I3KTNpnZkNf03Smus0X uQL307PPZpoWummrpPofOxO3AcN+UVdrFcZMo91kdkX7VUUfO+QkPlInMQmw058zFaEA Kr2/kMTaIHx8m/7IsF5EA3/R+2TcM2q+ftiXPsnVZS5ihmaIqrJmPQJbOEloYHFlObiH LQwg== X-Gm-Message-State: AOAM5304PuoN5FgGisusE/DrqM9fyti/TmpCjm9bBH4gEi6voOFD/nTi 1b8i+aeJzLT1lchToFTa3zC4Wk/XyrolOA== X-Google-Smtp-Source: ABdhPJy5Nkr3eaYm9pkGcSB1H1RwYk0E3rPGnYp2ZFKbjr5/p82e2l7TvQEdB1zFjNOefge1ZymRsg== X-Received: by 2002:a17:90a:470a:: with SMTP id h10mr2971348pjg.25.1643046480997; Mon, 24 Jan 2022 09:48:00 -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.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Jan 2022 09:48:00 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Declan Doherty Subject: [PATCH v2 36/83] crypto/openssl: remove unnecessary NULL checks Date: Mon, 24 Jan 2022 09:46:32 -0800 Message-Id: <20220124174719.14417-37-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/openssl/rte_openssl_pmd_ops.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/crypto/openssl/rte_openssl_pmd_ops.c b/drivers/crypto/openssl/rte_openssl_pmd_ops.c index 52715f86f84a..b1c0b14fefd2 100644 --- a/drivers/crypto/openssl/rte_openssl_pmd_ops.c +++ b/drivers/crypto/openssl/rte_openssl_pmd_ops.c @@ -659,8 +659,7 @@ openssl_pmd_qp_release(struct rte_cryptodev *dev, uint16_t qp_id) if (dev->data->queue_pairs[qp_id] != NULL) { struct openssl_qp *qp = dev->data->queue_pairs[qp_id]; - if (qp->processed_ops) - rte_ring_free(qp->processed_ops); + rte_ring_free(qp->processed_ops); rte_free(dev->data->queue_pairs[qp_id]); dev->data->queue_pairs[qp_id] = NULL; @@ -748,8 +747,7 @@ openssl_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