Merge tag 'media/v5.9-3' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab...
[linux-2.6-microblaze.git] / crypto / aegis128-core.c
index 71c11cb..44fb495 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;