crypto: remove CRYPTO_TFM_RES_BAD_KEY_LEN
[linux-block.git] / arch / x86 / crypto / crc32c-intel_glue.c
index eefa0862f309c12b12f5978d2001bff3e1f6c889..c20d1b8a82c38b7a5eab6c95480b4218953e9703 100644 (file)
@@ -91,10 +91,8 @@ static int crc32c_intel_setkey(struct crypto_shash *hash, const u8 *key,
 {
        u32 *mctx = crypto_shash_ctx(hash);
 
-       if (keylen != sizeof(u32)) {
-               crypto_shash_set_flags(hash, CRYPTO_TFM_RES_BAD_KEY_LEN);
+       if (keylen != sizeof(u32))
                return -EINVAL;
-       }
        *mctx = le32_to_cpup((__le32 *)key);
        return 0;
 }