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 4F1BEA04AD; Mon, 24 Jan 2022 18:50:32 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2345E42879; Mon, 24 Jan 2022 18:48:03 +0100 (CET) Received: from mail-pj1-f52.google.com (mail-pj1-f52.google.com [209.85.216.52]) by mails.dpdk.org (Postfix) with ESMTP id DA4AF42865 for ; Mon, 24 Jan 2022 18:47:58 +0100 (CET) Received: by mail-pj1-f52.google.com with SMTP id d5so14722729pjk.5 for ; Mon, 24 Jan 2022 09:47:58 -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=808NQ/tNS3F0TUlEOIXG/kCrAji71oBNcGlORGKTRrQ=; b=MOWROAq67Y4VAMFcNPPYO1zI3AXX4fJt2n1tgZvwWXnfBK+aBvp/5/aCh7F//I51IP 34Jq4ZL4IAYJe/Y+rIVRF6JXPBTIp89HWm1HGsoLeIuj3jB7uTh1OKXsKi51CkUcuxgG 1Aw5qd0+oninimPJrrs+TGRiQSfTZfzRYdWqNE9qJNRhn19wWGX14JnBETcfb64Q6bEj YNEcdczLPmIm45nVz7gtomhPMMcOW7NfXwuWJvWGhee8GfmPv2GVxKSzEW//JBwc4v/b DYZlWQP3XNpsH0x7F6J+iPGiPTn70ZARobJQWgs06/ORkK/sVV/8pFr16G4VaOnIOinb kZvw== 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=808NQ/tNS3F0TUlEOIXG/kCrAji71oBNcGlORGKTRrQ=; b=5Gz7aIdgJWW5nPpKjsjoPFpT0bCAC7BWRzQHQ/CeYl2+IKcgfMRQJ1gf1fqNGelECv K4aQticAstTFMgonLmO4JMgdXXOGiPga9WW9oaLO5eBwj6fMvUShejATX9yXRluuO1sZ oTMUuHX6E74QCm30Oby1vnVj2K9aTrXjLWxR+kCVB78i/0vsvI4a9EwoMccACRDiLwE3 WJ5ka+hAQZ+VvspDu+W7PgcaMtDoYzw9w8eLXncmTjl9TS84GEmqn+BRVB2pTaaT89T7 99oU+4TnuGoSzt+DaZdj5ZzK9zSzoY4LNBzQlsjHlLJ/tZ7dCyxe8hlsA3FCIfOpuZW7 PuVw== X-Gm-Message-State: AOAM530ayjnwhSdeWT5lU8luDQG0ugKduWSUV4poyPxYRVKUcpTPkb7l qn8e66yfuXRy3Rp5C4p7Zl2TV709zjRK/g== X-Google-Smtp-Source: ABdhPJzqxK3sfBbinRdkLZ2TN/6PlZqT+Y6mrVaS7qPCvs/nAZ6/14GGH3vUsAldJkBHcF04wE1crg== X-Received: by 2002:a17:90a:1b25:: with SMTP id q34mr3022836pjq.104.1643046477805; Mon, 24 Jan 2022 09:47:57 -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.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Jan 2022 09:47:57 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Liron Himi , Michael Shamis Subject: [PATCH v2 33/83] crypto/mvsam: remove unnecessary NULL checks Date: Mon, 24 Jan 2022 09:46:29 -0800 Message-Id: <20220124174719.14417-34-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 Reviewed-by: Liron Himi --- 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