crypto: remove CRYPTO_TFM_RES_BAD_KEY_LEN
[linux-block.git] / arch / x86 / crypto / camellia_aesni_avx_glue.c
index 31a82a79f4ac99e1de124dc0be72199604c630b4..4e5de6ef206e1394cf20c0605e0d9b84164effd4 100644 (file)
@@ -144,8 +144,7 @@ static const struct common_glue_ctx camellia_dec_xts = {
 static int camellia_setkey(struct crypto_skcipher *tfm, const u8 *key,
                           unsigned int keylen)
 {
-       return __camellia_setkey(crypto_skcipher_ctx(tfm), key, keylen,
-                                &tfm->base.crt_flags);
+       return __camellia_setkey(crypto_skcipher_ctx(tfm), key, keylen);
 }
 
 static int ecb_encrypt(struct skcipher_request *req)
@@ -177,7 +176,6 @@ int xts_camellia_setkey(struct crypto_skcipher *tfm, const u8 *key,
                        unsigned int keylen)
 {
        struct camellia_xts_ctx *ctx = crypto_skcipher_ctx(tfm);
-       u32 *flags = &tfm->base.crt_flags;
        int err;
 
        err = xts_verify_key(tfm, key, keylen);
@@ -185,13 +183,12 @@ int xts_camellia_setkey(struct crypto_skcipher *tfm, const u8 *key,
                return err;
 
        /* first half of xts-key is for crypt */
-       err = __camellia_setkey(&ctx->crypt_ctx, key, keylen / 2, flags);
+       err = __camellia_setkey(&ctx->crypt_ctx, key, keylen / 2);
        if (err)
                return err;
 
        /* second half of xts-key is for tweak */
-       return __camellia_setkey(&ctx->tweak_ctx, key + keylen / 2, keylen / 2,
-                               flags);
+       return __camellia_setkey(&ctx->tweak_ctx, key + keylen / 2, keylen / 2);
 }
 EXPORT_SYMBOL_GPL(xts_camellia_setkey);