crypto: remove CRYPTO_TFM_RES_BAD_KEY_LEN
[linux-block.git] / drivers / crypto / rockchip / rk3288_crypto_skcipher.c
index ca4de4ddfe1f4e326ba42550bbcd252edb90aab9..4a75c8e1fa6c1993479745529eba732cf2eae8b8 100644 (file)
@@ -34,10 +34,8 @@ static int rk_aes_setkey(struct crypto_skcipher *cipher,
        struct rk_cipher_ctx *ctx = crypto_tfm_ctx(tfm);
 
        if (keylen != AES_KEYSIZE_128 && keylen != AES_KEYSIZE_192 &&
-           keylen != AES_KEYSIZE_256) {
-               crypto_skcipher_set_flags(cipher, CRYPTO_TFM_RES_BAD_KEY_LEN);
+           keylen != AES_KEYSIZE_256)
                return -EINVAL;
-       }
        ctx->keylen = keylen;
        memcpy_toio(ctx->dev->reg + RK_CRYPTO_AES_KEY_0, key, keylen);
        return 0;