crypto: remove CRYPTO_TFM_RES_BAD_KEY_LEN
[linux-block.git] / arch / arm64 / crypto / aes-ce-glue.c
index 6d085dc56c5123b8c0c053f256f73a2744f070b3..56a5f6f0b0c123ac8668b0125b4b04bb9af052ed 100644 (file)
@@ -143,14 +143,8 @@ int ce_aes_setkey(struct crypto_tfm *tfm, const u8 *in_key,
                  unsigned int key_len)
 {
        struct crypto_aes_ctx *ctx = crypto_tfm_ctx(tfm);
-       int ret;
 
-       ret = ce_aes_expandkey(ctx, in_key, key_len);
-       if (!ret)
-               return 0;
-
-       tfm->crt_flags |= CRYPTO_TFM_RES_BAD_KEY_LEN;
-       return -EINVAL;
+       return ce_aes_expandkey(ctx, in_key, key_len);
 }
 EXPORT_SYMBOL(ce_aes_setkey);