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 03C3CA04AD; Mon, 24 Jan 2022 18:50:21 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D718F428A3; Mon, 24 Jan 2022 18:47:59 +0100 (CET) Received: from mail-pl1-f176.google.com (mail-pl1-f176.google.com [209.85.214.176]) by mails.dpdk.org (Postfix) with ESMTP id CB57A42898 for ; Mon, 24 Jan 2022 18:47:56 +0100 (CET) Received: by mail-pl1-f176.google.com with SMTP id d1so16302400plh.10 for ; Mon, 24 Jan 2022 09:47:56 -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=v6oHjltU17sKMlDqBS4DiHlqms74CbqMv0yAWufZ2pE=; b=DHtL9E9tEydrGFmyQHiaqileloqf2d4r7uVauvVsqxOxZsmwrbQJQmT2U8GFA0hjkl 0t5J9kjhaM517ghK1IdjUN2aMYiRsxsR7kOJNdu8qEdBIWfCZmPR/jPj1sf7iAoTE/Kg K4tcFgZ+8/ombVRhRAtbjz+/fmZrJ5IdoLDf9IB0P8QzymSaazJ9MNmB35Yw8FhagNFs 3cLLYoxkK7BUqik4Hd9c29y7icXD6j+N3COSijBA8vdG9g7MyHq5C8/H9GquoXsLX3HZ 6C5+5AlbjQFN2UqIGsg1dUi27syPtwvFdDFxEBbi8kdyGJzt1CyBNBWusgowaWmegxP3 6Z7A== 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=v6oHjltU17sKMlDqBS4DiHlqms74CbqMv0yAWufZ2pE=; b=XZCXVM+EWqJb2g70CKobQZ8T/50WAqGr1uXFqW2XJ5fm68MnfIDqUj8fTMrdMnfOwI p6O4PJ3udxgnhF80Nwqwry7VyZMPiyaZkZDIowoA6HsOWeVausLYM239Tn8GxDvbr3ck ftFeaE5HxZ2z1Jy2BgBeVSLwZbzb8jeZjDxA6fwfh8O8QxCshKeCWBkoB6zAha8z5tVV Ug/O9zCDmw92laslmfPsfei5KmUucSidG1oV0W94dMrAdzO51H3thJzxqen8diz7DBFe 5cqlDPBrjLbcibo9FHf1pfpopjhQFfDDfeed9hY6Lp7rkioOLBu0CLrtL7eHamc1fAC3 YRnA== X-Gm-Message-State: AOAM530UFM/Xt0az4Ts46cOopK+UNYpt//uiGbyWSco/JOt/evb+2R3w g3UokEl7MGhitCw9YyeOS7YLnmUttxstOQ== X-Google-Smtp-Source: ABdhPJwqmYPE1TOHEYgJfLSy4YsSXIAoAQeeOwolZSqvsHmlN/SxAZE9++eXo1IrFPfhujOuHOOAJQ== X-Received: by 2002:a17:902:d509:b0:14b:4534:76d6 with SMTP id b9-20020a170902d50900b0014b453476d6mr7571886plg.0.1643046475820; Mon, 24 Jan 2022 09:47:55 -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.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Jan 2022 09:47:55 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Ankur Dwivedi , Anoob Joseph , Tejasree Kondoj Subject: [PATCH v2 31/83] crypto/cnxk: remove unnecessary NULL checks Date: Mon, 24 Jan 2022 09:46:27 -0800 Message-Id: <20220124174719.14417-32-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/cnxk/cnxk_ae.h | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/crypto/cnxk/cnxk_ae.h b/drivers/crypto/cnxk/cnxk_ae.h index 6222171fe603..01ccfcd33432 100644 --- a/drivers/crypto/cnxk/cnxk_ae.h +++ b/drivers/crypto/cnxk/cnxk_ae.h @@ -196,13 +196,11 @@ cnxk_ae_free_session_parameters(struct cnxk_ae_sess *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