Merge tag 'tomoyo-pr-20200128' of git://git.osdn.net/gitroot/tomoyo/tomoyo-test1
[linux-2.6-microblaze.git] / crypto / camellia_generic.c
index b6a1121..9a5783e 100644 (file)
@@ -970,12 +970,9 @@ camellia_set_key(struct crypto_tfm *tfm, const u8 *in_key,
 {
        struct camellia_ctx *cctx = crypto_tfm_ctx(tfm);
        const unsigned char *key = (const unsigned char *)in_key;
-       u32 *flags = &tfm->crt_flags;
 
-       if (key_len != 16 && key_len != 24 && key_len != 32) {
-               *flags |= CRYPTO_TFM_RES_BAD_KEY_LEN;
+       if (key_len != 16 && key_len != 24 && key_len != 32)
                return -EINVAL;
-       }
 
        cctx->key_length = key_len;