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 2D55DA04AD; Mon, 24 Jan 2022 18:50:52 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 323E3428C6; Mon, 24 Jan 2022 18:48:07 +0100 (CET) Received: from mail-pl1-f179.google.com (mail-pl1-f179.google.com [209.85.214.179]) by mails.dpdk.org (Postfix) with ESMTP id 0F5564280A for ; Mon, 24 Jan 2022 18:48:03 +0100 (CET) Received: by mail-pl1-f179.google.com with SMTP id c3so16313695pls.5 for ; Mon, 24 Jan 2022 09:48:02 -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=F7D6wuAznDOFZ2sEbMzVSYJuoXX5dzlpWYuMPiHdWD8=; b=UVDqljV6YeMLUs5xnYMkct7YRhiDfZK2naDT0ieRXefxfdyLxwfq6RBMqItUW8YEAX ZWSFT3BKmUFW6yV5YlfgxFcqbOxE6Vr1tf9Lv/nmE5yFDTuN/KfBCMRZ3X2GbChhWC8r SJqpDTYR4OwfkeBMm7h/UHp0SgksXby1jDuweRYYri+Iey4tD3V+f/RC10cfrBuFZy1i 8XkcFVsFjpQsJv9ObIn4SzVbFeR4SLEtmPJfEmeyj8LkrUurcnmh66wTJK9Ylk1P9iWz khPk1w4FtYXVQp1B94OFVpSvV9D6yrcsXPfjqPFZSCpy4o1RjyWlh3we0ieMOCAuSpBG EDLQ== 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=F7D6wuAznDOFZ2sEbMzVSYJuoXX5dzlpWYuMPiHdWD8=; b=ZIUQMsNKwVSfti+mgYea6+Je/2xD0BBblD9/kP/T1sQvoMZ5JhROYjqp4jVhc5X9wz 6Y0qiWHirinqnZ8JNGwwKEUkQd3fW79IvsJ9Za2+FqxAOkwuJTRbAHFC+GmBt8eT0+Hc dZSAKCVR/96ea2Sa9cHYbajVb+xj21TVqRVO9bLAMyLJQTs6siq52HRvyenIaimBB7zg KqA+kNLUPLKYZkU5PwwYoL+NJKeiH3foC4zs1mhR8DXKVKfiizCJ6oyvr1x/ExKQd943 LOcr0Sq9Rq7NB6ypcmlqoPCCktENOEUo/MYA6vOuRlr3sEOxAMa9RWvuNKjDqZEuoU54 cgOg== X-Gm-Message-State: AOAM530TZPfNKBNhgnrMjWEWnvbir6JZf0WQIpRVd3EBRNMmpc/gbXfW XJLiQyJz8lgS6dPrDuVHlURPpc5uFJCxpg== X-Google-Smtp-Source: ABdhPJxTL7hN64jZ1eeN49bgcwm3TWDsqH4cg7A5rncr5LGQ4mg4HZVa12ZRZa9evm4q1gxoo1ZGuA== X-Received: by 2002:a17:902:8b8b:b0:149:6d32:4b4c with SMTP id ay11-20020a1709028b8b00b001496d324b4cmr15320017plb.8.1643046481995; Mon, 24 Jan 2022 09:48:01 -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.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Jan 2022 09:48:01 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Fan Zhang Subject: [PATCH v2 37/83] crypto/scheduler: remove unnecessary NULL checks Date: Mon, 24 Jan 2022 09:46:33 -0800 Message-Id: <20220124174719.14417-38-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/scheduler/scheduler_pmd_ops.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/crypto/scheduler/scheduler_pmd_ops.c b/drivers/crypto/scheduler/scheduler_pmd_ops.c index f61640c9d646..f3a1bd626c6f 100644 --- a/drivers/crypto/scheduler/scheduler_pmd_ops.c +++ b/drivers/crypto/scheduler/scheduler_pmd_ops.c @@ -371,10 +371,8 @@ scheduler_pmd_qp_release(struct rte_cryptodev *dev, uint16_t qp_id) if (!qp_ctx) return 0; - if (qp_ctx->order_ring) - rte_ring_free(qp_ctx->order_ring); - if (qp_ctx->private_qp_ctx) - rte_free(qp_ctx->private_qp_ctx); + rte_ring_free(qp_ctx->order_ring); + rte_free(qp_ctx->private_qp_ctx); rte_free(qp_ctx); dev->data->queue_pairs[qp_id] = NULL; -- 2.30.2