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 9C9EEA04A6; Mon, 24 Jan 2022 01:08:22 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5807F42866; Mon, 24 Jan 2022 01:05:59 +0100 (CET) Received: from mail-pl1-f179.google.com (mail-pl1-f179.google.com [209.85.214.179]) by mails.dpdk.org (Postfix) with ESMTP id 10C3E42850 for ; Mon, 24 Jan 2022 01:05:56 +0100 (CET) Received: by mail-pl1-f179.google.com with SMTP id y17so3567331plg.7 for ; Sun, 23 Jan 2022 16:05:55 -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=e+qY8seeWaYoQVrTUghY5Eb0w7nKmf1/blL1bLaw3rU=; b=3aM2e5eb/IwlkD9bYUpl3kwyLp9grZGTN5Il6cc3ptKmfWb4JSE2SgW1mMMUWS8vgB VJ/9Czuhpv8uvg1CDmvoFIbN4bZSlpesyEty9QgUyx0qoA74P96cybgZCbZCBbxY6/ld wkn6l2v7I4FTiXF+JMHtnrhYas2i+ZoHli2CQ4JaFXWAccCzbS1gJ2kI80uhyDF9M/s/ Ij+Zixq/hJI9pJy54BStZfacA+wLDw930V0Pb9HxDlqXZ0lVTOW/HhZHli4LVD8HXcCG lHQMJl/igxMqh4h8PWgFuJWk+L9Y3CeZQ68rweOZuZ9n2Nq2x4P6wOq3jEhaO89+AMKs 6+Vg== 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=e+qY8seeWaYoQVrTUghY5Eb0w7nKmf1/blL1bLaw3rU=; b=5cHlJu/Nx6z5jWd6m5cqXM96beeoJ87b/FOHE7iY/Q3/NeQ2Pet0NcOPe7GFWjqolU 3EnVuoQxr7KLc1n8ZZOxP3vqbwIPNPO9G62di8jUj6m9eomQQmDeX/omht/TILOMzHb2 SbqpxNqWQMLZfKPcBReeOc/VIcHH6jxgFzXKIPcXl9M43X8wInnuKxjlNTxLGOlD/zX8 nbUlq4lJ82h08WbrtFO0FXpgyRA60Ud4kE6mKfplfCHSlyenM6axdECJCz4/l6wn7vhN JmmG9CpPfH+0MMbsVg3hJCR765ntLGyRRT+kVsip3wP+XFYo3VOqbD2KQCZ487iL4V1D dAoA== X-Gm-Message-State: AOAM532LrTqZfPb6ir22hOpEpNYZ6OiSaUycBIoSmIrrpq0F8L1EwEGQ y7wrBbGzxFabpxouG6IOQqEn1JdgwPmdWg== X-Google-Smtp-Source: ABdhPJzbmGoGbmxrI8IWh6/64pQtfCGYQTD6bDr964QcuLiN9g00jvACgnY8sRYkagJyMqYWgYseQw== X-Received: by 2002:a17:902:d682:b0:14a:ec57:26fb with SMTP id v2-20020a170902d68200b0014aec5726fbmr12425052ply.114.1642982755049; Sun, 23 Jan 2022 16:05:55 -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.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 23 Jan 2022 16:05:54 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Michael Shamis , Liron Himi Subject: [PATCH 32/82] crypto/mvsam: remove unnecessary NULL checks Date: Sun, 23 Jan 2022 16:04:28 -0800 Message-Id: <20220124000518.319850-33-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/mvsam/rte_mrvl_pmd_ops.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/crypto/mvsam/rte_mrvl_pmd_ops.c b/drivers/crypto/mvsam/rte_mrvl_pmd_ops.c index 3064b1f136fe..f828dc9db5f6 100644 --- a/drivers/crypto/mvsam/rte_mrvl_pmd_ops.c +++ b/drivers/crypto/mvsam/rte_mrvl_pmd_ops.c @@ -774,10 +774,8 @@ mrvl_crypto_pmd_sym_session_configure(__rte_unused struct rte_cryptodev *dev, } /* free the keys memory allocated for session creation */ - if (mrvl_sess->sam_sess_params.cipher_key != NULL) - free(mrvl_sess->sam_sess_params.cipher_key); - if (mrvl_sess->sam_sess_params.auth_key != NULL) - free(mrvl_sess->sam_sess_params.auth_key); + free(mrvl_sess->sam_sess_params.cipher_key); + free(mrvl_sess->sam_sess_params.auth_key); return 0; } -- 2.30.2