Commit b3bd5869 authored by Dan Carpenter's avatar Dan Carpenter Committed by Herbert Xu

crypto: remove a duplicate checks in __cbc_decrypt()

We checked "nbytes < bsize" before so it can't happen here.
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Acked-by: default avatarJussi Kivilinna <jussi.kivilinna@iki.fi>
Acked-by: default avatarJohannes Götzfried <johannes.goetzfried@cs.fau.de>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent fb5d23e3
...@@ -223,9 +223,6 @@ static unsigned int __cbc_decrypt(struct blkcipher_desc *desc, ...@@ -223,9 +223,6 @@ static unsigned int __cbc_decrypt(struct blkcipher_desc *desc,
src -= 1; src -= 1;
dst -= 1; dst -= 1;
} while (nbytes >= bsize * 4); } while (nbytes >= bsize * 4);
if (nbytes < bsize)
goto done;
} }
/* Handle leftovers */ /* Handle leftovers */
......
...@@ -203,9 +203,6 @@ static unsigned int __cbc_decrypt(struct blkcipher_desc *desc, ...@@ -203,9 +203,6 @@ static unsigned int __cbc_decrypt(struct blkcipher_desc *desc,
src -= 1; src -= 1;
dst -= 1; dst -= 1;
} while (nbytes >= bsize * CAST5_PARALLEL_BLOCKS); } while (nbytes >= bsize * CAST5_PARALLEL_BLOCKS);
if (nbytes < bsize)
goto done;
} }
/* Handle leftovers */ /* Handle leftovers */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment