From: Piotr Azarewicz Date: Mon, 9 Jan 2017 14:45:36 +0000 (+0100) Subject: crypto/openssl: remove unneeded check X-Git-Tag: spdx-start~4705 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=5d63ef31d8a51bb318d10c4d0ce99cc4184a6d70;p=dpdk.git crypto/openssl: remove unneeded check 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 Tested-by: Zhaoyan Chen Acked-by: Declan Doherty --- diff --git a/drivers/crypto/openssl/rte_openssl_pmd.c b/drivers/crypto/openssl/rte_openssl_pmd.c index 832ea1d0ba..312154a561 100644 --- a/drivers/crypto/openssl/rte_openssl_pmd.c +++ b/drivers/crypto/openssl/rte_openssl_pmd.c @@ -522,8 +522,7 @@ process_openssl_cipher_decrypt(uint8_t *src, uint8_t *dst, 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;