From: Dan Carpenter Date: Thu, 13 Feb 2014 14:58:32 +0000 (+0300) Subject: crypto: remove a duplicate checks in __cbc_decrypt() X-Git-Tag: v3.15-rc1~111^2~41 X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=commitdiff_plain;h=b3bd5869fd65f509d96a9fcb47cdea81163a811d;p=linux.git crypto: remove a duplicate checks in __cbc_decrypt() We checked "nbytes < bsize" before so it can't happen here. Signed-off-by: Dan Carpenter Acked-by: Jussi Kivilinna Acked-by: Johannes Götzfried Signed-off-by: Herbert Xu --- diff --git a/arch/x86/crypto/blowfish_glue.c b/arch/x86/crypto/blowfish_glue.c index 50ec333b70e6..8af519ed73d1 100644 --- a/arch/x86/crypto/blowfish_glue.c +++ b/arch/x86/crypto/blowfish_glue.c @@ -223,9 +223,6 @@ static unsigned int __cbc_decrypt(struct blkcipher_desc *desc, src -= 1; dst -= 1; } while (nbytes >= bsize * 4); - - if (nbytes < bsize) - goto done; } /* Handle leftovers */ diff --git a/arch/x86/crypto/cast5_avx_glue.c b/arch/x86/crypto/cast5_avx_glue.c index e6a3700489b9..e57e20ab5e0b 100644 --- a/arch/x86/crypto/cast5_avx_glue.c +++ b/arch/x86/crypto/cast5_avx_glue.c @@ -203,9 +203,6 @@ static unsigned int __cbc_decrypt(struct blkcipher_desc *desc, src -= 1; dst -= 1; } while (nbytes >= bsize * CAST5_PARALLEL_BLOCKS); - - if (nbytes < bsize) - goto done; } /* Handle leftovers */