]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - crypto/camellia_generic.c
Merge tag 'riscv-for-linus-5.6-mw0' of git://git.kernel.org/pub/scm/linux/kernel...
[linux.git] / crypto / camellia_generic.c
index b6a1121e2478bc8643561492007d40801c4809c3..9a5783e5196a535bc421ba314e7366e05eea81fa 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;