summaryrefslogtreecommitdiff
path: root/crypto/des_generic.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@kernel.org>2020-03-21 09:23:40 +0100
committerIngo Molnar <mingo@kernel.org>2020-03-21 09:24:41 +0100
commita4654e9bde4ecedb4921e6c8fe2088114bdff1b3 (patch)
tree1b9970b520d7bc7176cc9460fe67f210be5ea181 /crypto/des_generic.c
parent7add7875a8eb4ffe5eddaf8a11e409c9e1b6e3f3 (diff)
parente4160b2e4b02377c67f8ecd05786811598f39acd (diff)
Merge branch 'x86/kdump' into locking/kcsan, to resolve conflicts
Conflicts: arch/x86/purgatory/Makefile Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'crypto/des_generic.c')
-rw-r--r--crypto/des_generic.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/crypto/des_generic.c b/crypto/des_generic.c
index 6e13a4a29ecb..c85354a5e94c 100644
--- a/crypto/des_generic.c
+++ b/crypto/des_generic.c
@@ -29,11 +29,8 @@ static int des_setkey(struct crypto_tfm *tfm, const u8 *key,
else
err = 0;
}
-
- if (err) {
+ if (err)
memset(dctx, 0, sizeof(*dctx));
- crypto_tfm_set_flags(tfm, CRYPTO_TFM_RES_WEAK_KEY);
- }
return err;
}
@@ -64,11 +61,8 @@ static int des3_ede_setkey(struct crypto_tfm *tfm, const u8 *key,
else
err = 0;
}
-
- if (err) {
+ if (err)
memset(dctx, 0, sizeof(*dctx));
- crypto_tfm_set_flags(tfm, CRYPTO_TFM_RES_WEAK_KEY);
- }
return err;
}