crypto: remove CRYPTO_TFM_RES_BAD_KEY_LEN
[linux-block.git] / arch / x86 / crypto / ghash-clmulni-intel_glue.c
index 04d72a5a8ce9815ffca1db870b4110fe2a4c4166..4a9c9833a7d6a613804a789091495bd277b9ccb5 100644 (file)
@@ -57,10 +57,8 @@ static int ghash_setkey(struct crypto_shash *tfm,
        be128 *x = (be128 *)key;
        u64 a, b;
 
-       if (keylen != GHASH_BLOCK_SIZE) {
-               crypto_shash_set_flags(tfm, CRYPTO_TFM_RES_BAD_KEY_LEN);
+       if (keylen != GHASH_BLOCK_SIZE)
                return -EINVAL;
-       }
 
        /* perform multiplication by 'x' in GF(2^128) */
        a = be64_to_cpu(x->a);