Merge tag 'for-linus-20180204' of git://git.kernel.dk/linux-block
[linux-2.6-microblaze.git] / crypto / ghash-generic.c
index 12ad3e3..1bffb3f 100644 (file)
@@ -56,9 +56,6 @@ static int ghash_update(struct shash_desc *desc,
        struct ghash_ctx *ctx = crypto_shash_ctx(desc->tfm);
        u8 *dst = dctx->buffer;
 
-       if (!ctx->gf128)
-               return -ENOKEY;
-
        if (dctx->bytes) {
                int n = min(srclen, dctx->bytes);
                u8 *pos = dst + (GHASH_BLOCK_SIZE - dctx->bytes);
@@ -111,9 +108,6 @@ static int ghash_final(struct shash_desc *desc, u8 *dst)
        struct ghash_ctx *ctx = crypto_shash_ctx(desc->tfm);
        u8 *buf = dctx->buffer;
 
-       if (!ctx->gf128)
-               return -ENOKEY;
-
        ghash_flush(ctx, dctx);
        memcpy(dst, buf, GHASH_BLOCK_SIZE);