summaryrefslogtreecommitdiff
path: root/crypto/aead.c
diff options
context:
space:
mode:
authorJames Morris <james.morris@microsoft.com>2019-03-26 16:28:01 -0700
committerJames Morris <james.morris@microsoft.com>2019-03-26 16:28:01 -0700
commit0d79d47e75b64925d32d790a0907fbbaeb16cf1a (patch)
tree92cc49cb728ae789fcf1306a4a36206cd0f7a098 /crypto/aead.c
parentaaf6aed3ef1a735e34339a51f26f5f3e5fe9a478 (diff)
parent1d5d6bd2502dff39b91d2280711ecbf86c1287a8 (diff)
downloadlinux-crypto-0d79d47e75b64925d32d790a0907fbbaeb16cf1a.tar.gz
linux-crypto-0d79d47e75b64925d32d790a0907fbbaeb16cf1a.zip
Merge tag 'v5.1-rc2' into next-general
Merge to Linux 5.1-rc2 for subsystems to work with.
Diffstat (limited to '')
-rw-r--r--crypto/aead.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/crypto/aead.c b/crypto/aead.c
index 189c52d1..4908b5e8 100644
--- a/crypto/aead.c
+++ b/crypto/aead.c
@@ -61,8 +61,10 @@ int crypto_aead_setkey(struct crypto_aead *tfm,
else
err = crypto_aead_alg(tfm)->setkey(tfm, key, keylen);
- if (err)
+ if (unlikely(err)) {
+ crypto_aead_set_flags(tfm, CRYPTO_TFM_NEED_KEY);
return err;
+ }
crypto_aead_clear_flags(tfm, CRYPTO_TFM_NEED_KEY);
return 0;