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 1A300A04A6; Mon, 24 Jan 2022 01:07:32 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id EF9CB42832; Mon, 24 Jan 2022 01:05:48 +0100 (CET) Received: from mail-pl1-f174.google.com (mail-pl1-f174.google.com [209.85.214.174]) by mails.dpdk.org (Postfix) with ESMTP id A60464281F for ; Mon, 24 Jan 2022 01:05:45 +0100 (CET) Received: by mail-pl1-f174.google.com with SMTP id j16so3364889plx.4 for ; Sun, 23 Jan 2022 16:05:45 -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=RR/FIqC4COH8qNmyguiRigka//SaLca1ePP6u1TGaNUvifbMSLmaHXA+CZL2iF8+S4 OkXUvwl3fdt084vczj1FN0tk8YN0gi/9IKpDXTq4zC2MD9sKQusdRdmjD8n33z1eGB6M hptCfhAaE3E+HrnqwLIkag2c4IdMyiOLdbpbpAV7TNjHsnEyXlrt0QRM9GKZ6whizpas KdVxRXP9RNXXPqrHQ/KLNrmm8U5iE7SrW8mlXP2RTcIqqmVsBQScrPnyTTWpVAn5fi2J 8p55LCOeE7ybiQVAXkAvsYcgUYR9VAKUvoyUZTAGFbCLtrhnst3h97qiXVYAWVfGCmeX MFmg== 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=Y31gmximU8SY/x+zhE+JTecD3wPKmhEg4i7CspweRuy33fUGc+7TV+1/MXek2BaT6z VHzGgOjaZQooZscbLlGTxFwNNm7jMJk1kYebzpBYajgaBtG+0KJOM0HzZI0DfgDCsVtz pLaXI13SV+gQjZDY1VGwmVXxdxLACOQERiZF2Tnp4ZO1W1a0qDcvonVHVTPZ87P6YPWY ToXRn+YcInVTARirf1vgh16tu2xTbYCxL8yKbq16SyxZC2xYZF1GlzXCKh65jm49ma0g X3LRalRHQ+AN4x2Gz8Je+RbvExBbOsrLM/4yMGOofuMhldkYMT+RrndWIl7+SurpaNZF jEZg== X-Gm-Message-State: AOAM530UPDatzKsO4YNoqZJPhlm4qPhOsqFBDFRvJyRaEsmvj177zykv xCifDcAhKIB5+t4k1LayYith0URYXs8QqA== X-Google-Smtp-Source: ABdhPJwm2yy8xztCueBkqphQxC5m4BJRDEGLYLSp1BtrLuI6KRfQR5SmDK5fc5evmyz2U0ZZJTi9bQ== X-Received: by 2002:a17:90a:1b25:: with SMTP id q34mr10794779pjq.104.1642982744686; Sun, 23 Jan 2022 16:05:44 -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.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 23 Jan 2022 16:05:44 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Anoob Joseph Subject: [PATCH 22/82] common/cpt: remove unnecessary NULL checks Date: Sun, 23 Jan 2022 16:04:18 -0800 Message-Id: <20220124000518.319850-23-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/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