crypto: remove CRYPTO_TFM_RES_BAD_KEY_LEN
[linux-block.git] / arch / sparc / crypto / crc32c_glue.c
index 1299073285a36510dffd9374f0c86fa366cb056f..4e9323229e7120e12b51a0512bff37dbdfeaa841 100644 (file)
@@ -33,10 +33,8 @@ static int crc32c_sparc64_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;
-       }
        *(__le32 *)mctx = le32_to_cpup((__le32 *)key);
        return 0;
 }