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 BC820A04A6; Mon, 24 Jan 2022 01:08:39 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8943D4287B; Mon, 24 Jan 2022 01:06:02 +0100 (CET) Received: from mail-pl1-f173.google.com (mail-pl1-f173.google.com [209.85.214.173]) by mails.dpdk.org (Postfix) with ESMTP id 107D242865 for ; Mon, 24 Jan 2022 01:05:59 +0100 (CET) Received: by mail-pl1-f173.google.com with SMTP id l17so7722228plg.1 for ; Sun, 23 Jan 2022 16:05:58 -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=2V2mYIJ1Qs816uped/Tj/sg7L9iFX99FwWmodfeIpzBu6fOnboDyvho96vPYh35AZv enQ8j4GrNnpPMXEb2JHcFDd+4AQ3XVqrpHUwBdbf/NE9VvxuKJXjb0YnMc1GDktzEazu g+aLCU2r2s0O7lAe1d+1dS8aAHHzu7v6JWi3liXWVBITxjVrTWx0wUbasQl67ysbeGsd xU8VOwKIJnREwd5UtvzzNTH6staSs1Ssei9wFH8mYlEYR7kDUFz/a0lKayTqtAL9/LMe yoqjknW21aQ0XdURkOlT7SPdUBkGB2RPebCv6WLCAsXvmCiVXRZIINCk74kJXeykeeOS 0KCw== 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=ytONp7gp/R6o5ZSxWiKivBagDreWcHgYtE1CdCKAEdHT0w1Oq4EBbHQ4MfWWPuSJug okELd1J0Bkm64W17hccS5cA9CtCeHkj6icMfyHtZU6oa9yPGu9R8+3MVK/bgO7FuG19G JtFA3FYpyV2xTjW60ek7OhMXP2GPlGUT0OFca9UJGBzx9j7p9ifGQs9pIYi23DaO2R3K 9ddibZmDv5d7E5Jl6O6iSbt0y89f0pAmKHEsIzOPPVCRSb1XNbMRyr8vhpFxaHhJE3pj UthojljHTLdjUFcxNU0oDxfr7/U0BuCLx0pXUc5UpTpzqfn0Slmq4RUjvba9IvQQRqvr 4XPA== X-Gm-Message-State: AOAM532O0LD1qc74WDjjcbCoEUf00ZlFBJYTGyHhfS3FwusjPA3kdIcy KbPsJn/DQTDlIaq8x0AT9Xfcyemz9c0ZHw== X-Google-Smtp-Source: ABdhPJzUEADK+VDB4ZiiCb8heGNTM5VofInC2I2flJkMXf9ND68aCY8n+t5zqiD1LmUL8SQx0+mkQA== X-Received: by 2002:a17:902:d4ca:b0:14b:5c6d:fc16 with SMTP id o10-20020a170902d4ca00b0014b5c6dfc16mr747047plg.24.1642982757997; Sun, 23 Jan 2022 16:05:57 -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.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 23 Jan 2022 16:05:57 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Declan Doherty Subject: [PATCH 35/82] crypto/openssl: remove unnecessary NULL checks Date: Sun, 23 Jan 2022 16:04:31 -0800 Message-Id: <20220124000518.319850-36-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/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