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 7E5C1A04A6; Mon, 24 Jan 2022 01:08:12 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 893CE4285B; Mon, 24 Jan 2022 01:05:57 +0100 (CET) Received: from mail-pf1-f175.google.com (mail-pf1-f175.google.com [209.85.210.175]) by mails.dpdk.org (Postfix) with ESMTP id 02A074284C for ; Mon, 24 Jan 2022 01:05:54 +0100 (CET) Received: by mail-pf1-f175.google.com with SMTP id i65so14225176pfc.9 for ; Sun, 23 Jan 2022 16:05:53 -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=3knzJiI5fac1WvWMGWRyLe65HYNAZ6DNmeqw4KfSd7vuSpIqfsvobLjVL8bY+sl3xy wSDjLYTNDzC7bc0Ad5Tu58noKwX5bOWxz28s2TZDYpIiG1w47AIukluauX/jgNrq465g em4hzpAvNPIY7Tz+YS9WJyjSLS/ya3mBsjHRhfIhDC/FEJsPsquK0X+x82yImm2WWtHl Z2ujz+MrYAesVHCswaU3dwJEayEeRrLqwSYyS8Nnytrar58wvpF80rd1Zhq4HTD/lpHz /uMwabTZkbN2HK/egOTbT2zxAaoQiKAnbVylTrenVMPP0KRdJPxsqodvt4hDI73gGES5 RUWw== 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=TIU6oCmUkIs05yaHL75CCe6/MKoTMxk5FwPi4QRpgSUooES4czeZ2ksOs/NPi1ttAn dNS3h0SLMWUEK/dimSsfAqb6CDNKono6RCzLZexv+CRkiKywUrsZ97D1cmRWtRndNB7C o2154VrTFicfD8w9DTcymw6vGHRaUxRPjIPMFiMLFvSLiRgaF/oXv9lB1Kv4Arqyh21d eMd/j3EFY7NSBjD+IX/4cDUvye04Zy910j2Ytx56lY7ybCCEXVEvGOLsF8VqAs3pIDkw 90LWQSvLnWBaxuWpLY2bglSzZSJmJ0rNizLMjjwlIzpNoD3N81eoAtGL8GHVNb57CRP2 ehoQ== X-Gm-Message-State: AOAM532tZtl42YH1GQxv1TM/LcgZLtWGteRuGSGBdpaZdNWuQiZfxqLp nBk+O+D+Og7hBUxaNTjUcRAu++LROFpNvg== X-Google-Smtp-Source: ABdhPJx33UON3+kjAxKuNWkfUID87gYNDfw0AA22cMyojiMJO+eY3jFu8ezdxdCdAljaT6EtbOG7Ug== X-Received: by 2002:a63:8749:: with SMTP id i70mr10060698pge.41.1642982752973; Sun, 23 Jan 2022 16:05:52 -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.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 23 Jan 2022 16:05:52 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Ankur Dwivedi , Anoob Joseph , Tejasree Kondoj Subject: [PATCH 30/82] crypto/cnxk: remove unnecessary NULL checks Date: Sun, 23 Jan 2022 16:04:26 -0800 Message-Id: <20220124000518.319850-31-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/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