OSDN Git Service

Merge 4.9.187 into android-4.9
[android-x86/kernel.git] / arch / arm64 / crypto / sha1-ce-glue.c
index f08ecf4..3431bb5 100644 (file)
@@ -58,7 +58,7 @@ static int sha1_ce_finup(struct shash_desc *desc, const u8 *data,
                         unsigned int len, u8 *out)
 {
        struct sha1_ce_state *sctx = shash_desc_ctx(desc);
-       bool finalize = !sctx->sst.count && !(len % SHA1_BLOCK_SIZE);
+       bool finalize = !sctx->sst.count && !(len % SHA1_BLOCK_SIZE) && len;
 
        /*
         * Allow the asm code to perform the finalization if there is no