]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - crypto/aegis128-core.c
Merge tag 'riscv-for-linus-5.6-mw0' of git://git.kernel.org/pub/scm/linux/kernel...
[linux.git] / crypto / aegis128-core.c
index 71c11cb5bad13ea15915df514cee5506b66febbc..44fb4956f0dd95eedccef64b47bb398d35e2e34d 100644 (file)
@@ -372,10 +372,8 @@ static int crypto_aegis128_setkey(struct crypto_aead *aead, const u8 *key,
 {
        struct aegis_ctx *ctx = crypto_aead_ctx(aead);
 
-       if (keylen != AEGIS128_KEY_SIZE) {
-               crypto_aead_set_flags(aead, CRYPTO_TFM_RES_BAD_KEY_LEN);
+       if (keylen != AEGIS128_KEY_SIZE)
                return -EINVAL;
-       }
 
        memcpy(ctx->key.bytes, key, AEGIS128_KEY_SIZE);
        return 0;