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 D2A77A04A6; Mon, 24 Jan 2022 01:08:45 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A622942884; Mon, 24 Jan 2022 01:06:03 +0100 (CET) Received: from mail-pf1-f174.google.com (mail-pf1-f174.google.com [209.85.210.174]) by mails.dpdk.org (Postfix) with ESMTP id 0B13542869 for ; Mon, 24 Jan 2022 01:06:00 +0100 (CET) Received: by mail-pf1-f174.google.com with SMTP id u10so9694012pfg.10 for ; Sun, 23 Jan 2022 16:05: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=F7D6wuAznDOFZ2sEbMzVSYJuoXX5dzlpWYuMPiHdWD8=; b=x4oPYbczQUHsZNmyQU5bKWg4vVGkyec52aa2vMh9+BXVhUr2T5+irTlJd2BAuB77by UMFHOWg7zP6xPJhrLHMf8SBZ31EWYLSU5bpns7weiK2+jTD64N+uzwUOe5mBClL0HrXL DOc7CUHbKXvUH3VfUwrBuh1RyEW4wDRf3qYKd2VihZcaBJ93w5IlWQEGhUdnD50qIMR8 xTrCeX7KvsLkYIg7RjaVP0v3bKSIeMvVLhpWi8JDuJFmKe1tclFbpDqt/r4hZeksYCOc cQZGARtXNm+3tqdK0ilo2ItgshwCAT+c1aqJYDAqt0IhlGV3Yyp//VAcp4rh5yFZwUTj /yXQ== 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=QuwBjd3MhJayn2R41X1CBkP3ihsHBBDkO+GxZoWfCxCEWgAo2QxnVhLqz1/g2sd4VB mRXbkF7MRN+XtgCaOxZ5JFQmBhQsRL5vGNyDIDTvt3lFTdsdQB8lKvlzUFJUz/vyQ+zw fNQHEykX1nXDfbH4kzQDhTyDSYXwv0eKDwc43xcO6QkpAGDKUf1gSM2PKZEKb16jaX2r JxVbRc29o12ohAx+Fl4lMQDfqyFwR/vZhCTbe54ltVa2/yUtNcv5JRWyRNPQvpAE6tKD 4EuIEcay3S0sZ6NmQi3yapdnxRMCXXhGHD0YAcrwrfKU27Grq2WQHzuI0ZEHKPmHpKnb gYXw== X-Gm-Message-State: AOAM5338QNYAOI3CZCRS3oaexYPnAeECfQLy5mmhRKqVavwsW/7Rar+N Fsthg+d4rNgtPmZWsoLM26O/aKksQiVHmw== X-Google-Smtp-Source: ABdhPJx6Y4TFbkZTaHvs9QifaTcLd4UbS4xY525vebw0TKu+L+Cx8TOSHLFxDU+HZvF76ydvTOLoSQ== X-Received: by 2002:a63:1562:: with SMTP id 34mr9923919pgv.15.1642982759063; Sun, 23 Jan 2022 16:05:59 -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.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 23 Jan 2022 16:05:58 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Fan Zhang Subject: [PATCH 36/82] crypto/scheduler: remove unnecessary NULL checks Date: Sun, 23 Jan 2022 16:04:32 -0800 Message-Id: <20220124000518.319850-37-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/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