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 0B7C6A04AD; Mon, 24 Jan 2022 18:49:40 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 511E64286F; Mon, 24 Jan 2022 18:47:51 +0100 (CET) Received: from mail-pf1-f178.google.com (mail-pf1-f178.google.com [209.85.210.178]) by mails.dpdk.org (Postfix) with ESMTP id 25A0142862 for ; Mon, 24 Jan 2022 18:47:48 +0100 (CET) Received: by mail-pf1-f178.google.com with SMTP id e28so12223174pfj.5 for ; Mon, 24 Jan 2022 09:47:48 -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=Ad25wPM5/3bGAKrapK+uGim/jbE+T1hChvcLxmfP2LM=; b=it9PB9arpCMHhn8QPBMHTVjuRs7QWvgWTXZzWiv/dYOqns/P+7fiFr6eTwCJKQHcuw P0uhiytooN80GM6RPk2r9wvFAjkk038mouzp3zzu7ZomO+ioslLJhI5/nxTUQMbEuYu5 iqWtHmd6qtjxZPgpqH0ncPhqim1DzPZcDsf31p4WO2usoKshpjXV9Eo+Gfrksaf4Ya4g 9KWjVCmyUA0xrFcQFuMqLORWcD9nKGTfNWzxnalA3mq5cdSZXDbF0A70BIs1CfFCj3cO WKafgYhzKZOSQmb4jLdDfSFomB2QbZrz3kqQ2b1NtkcqC+0fmU/n1ofNF8pIXs4R948r ynng== 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=Ad25wPM5/3bGAKrapK+uGim/jbE+T1hChvcLxmfP2LM=; b=RVmkCv2akznEdyN8ncc5DMwfa+MIdoWDzYGIu9KRAY/Yq6iRHFhERVk2s0M60PSVy7 nqyyozG8X45hJ6kFSvIdgh+trfdoElfs18porTMI24WV9gIuZnij1IjM5uRbxIGj28nc 3s/tdp5WunhO8IGwyau/jCS8Hltq7uxCcTmJCk+amrEMZIQ+td31r1SQHD7zjdaSMFeo M5ZOTptxXZwmLt52ytvWD8YTfVucJFgdBR7wO1YeC5gBbMfsRCS03ZeAmBOag+0EQJK3 XRAsnPUiSyuPLcsosS2fNtiI5iD7Tp4y0U5ULlQba0n28JQt4qWdHXbsn7YoWk8+qpxg P1Kg== X-Gm-Message-State: AOAM532fxFXdIxk6LHLpdRqfucLj6mWn8NEp0Fw2+NeNkYpXJLDGQ2hd stFZRLiWK69PBN/yVutJrva6ioaDas4tLQ== X-Google-Smtp-Source: ABdhPJyo6vm8dIed5nBtUfoNYtrIgzhKhVozg0q4tgUsVCsiEU1gu7n6XLZ6pbIiLSyvZS5Swn75yw== X-Received: by 2002:a65:6a97:: with SMTP id q23mr12815043pgu.464.1643046467202; Mon, 24 Jan 2022 09:47:47 -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.47.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Jan 2022 09:47:46 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Anoob Joseph Subject: [PATCH v2 23/83] common/cpt: remove unnecessary NULL checks Date: Mon, 24 Jan 2022 09:46:19 -0800 Message-Id: <20220124174719.14417-24-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/common/cpt/cpt_ucode_asym.h | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/common/cpt/cpt_ucode_asym.h b/drivers/common/cpt/cpt_ucode_asym.h index f0b5dddd8cdf..f5d91f2583bd 100644 --- a/drivers/common/cpt/cpt_ucode_asym.h +++ b/drivers/common/cpt/cpt_ucode_asym.h @@ -192,13 +192,11 @@ cpt_free_asym_session_parameters(struct cpt_asym_sess_misc *sess) switch (sess->xfrm_type) { case RTE_CRYPTO_ASYM_XFORM_RSA: rsa = &sess->rsa_ctx; - if (rsa->n.data) - rte_free(rsa->n.data); + rte_free(rsa->n.data); break; case RTE_CRYPTO_ASYM_XFORM_MODEX: mod = &sess->mod_ctx; - if (mod->modulus.data) - rte_free(mod->modulus.data); + rte_free(mod->modulus.data); break; case RTE_CRYPTO_ASYM_XFORM_ECDSA: /* Fall through */ -- 2.30.2