Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
[linux-2.6-block.git] / arch / arm64 / crypto / sha2-ce-glue.c
index 955c3c2d3f5a5acc0c55baf2f04b7237c6e5e16e..604a01a4ede6fe14852c0e701bafd3b6b63e790e 100644 (file)
@@ -57,7 +57,7 @@ static int sha256_ce_finup(struct shash_desc *desc, const u8 *data,
                           unsigned int len, u8 *out)
 {
        struct sha256_ce_state *sctx = shash_desc_ctx(desc);
-       bool finalize = !sctx->sst.count && !(len % SHA256_BLOCK_SIZE);
+       bool finalize = !sctx->sst.count && !(len % SHA256_BLOCK_SIZE) && len;
 
        if (!crypto_simd_usable()) {
                if (len)