From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id EFDDC37AF; Mon, 9 Jan 2017 15:45:46 +0100 (CET) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga103.fm.intel.com with ESMTP; 09 Jan 2017 06:45:46 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,339,1477983600"; d="scan'208";a="1110024619" Received: from gklab-246-023.igk.intel.com (HELO Sent) ([10.217.246.23]) by fmsmga002.fm.intel.com with SMTP; 09 Jan 2017 06:45:43 -0800 Received: by Sent (sSMTP sendmail emulation); Mon, 09 Jan 2017 15:45:38 +0100 From: Piotr Azarewicz To: pablo.de.lara.guarch@intel.com, dev@dpdk.org Cc: stable@dpdk.org Date: Mon, 9 Jan 2017 15:45:36 +0100 Message-Id: <1483973136-154458-1-git-send-email-piotrx.t.azarewicz@intel.com> X-Mailer: git-send-email 1.7.9.5 Subject: [dpdk-dev] [PATCH] crypto/openssl: fix that remove unneeded check X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Jan 2017 14:45:47 -0000 EVP_CIPHER_CTX_set_padding() function always returns 1, so the check is unneeded. Fixes: d61f70b4c918 ("crypto/libcrypto: add driver for OpenSSL library") Signed-off-by: Piotr Azarewicz --- drivers/crypto/openssl/rte_openssl_pmd.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/crypto/openssl/rte_openssl_pmd.c b/drivers/crypto/openssl/rte_openssl_pmd.c index 832ea1d..312154a 100644 --- a/drivers/crypto/openssl/rte_openssl_pmd.c +++ b/drivers/crypto/openssl/rte_openssl_pmd.c @@ -522,8 +522,7 @@ if (EVP_DecryptInit_ex(ctx, algo, NULL, key, iv) <= 0) goto process_cipher_decrypt_err; - if (EVP_CIPHER_CTX_set_padding(ctx, 0) <= 0) - goto process_cipher_decrypt_err; + EVP_CIPHER_CTX_set_padding(ctx, 0); if (EVP_DecryptUpdate(ctx, dst, &dstlen, src, srclen) <= 0) goto process_cipher_decrypt_err; -- 1.7.9.5