hc
2024-05-10 9999e48639b3cecb08ffb37358bcba3b48161b29
kernel/arch/s390/crypto/crc32-vx.c
....@@ -111,10 +111,8 @@
111111 {
112112 struct crc_ctx *mctx = crypto_shash_ctx(tfm);
113113
114
- if (newkeylen != sizeof(mctx->key)) {
115
- crypto_shash_set_flags(tfm, CRYPTO_TFM_RES_BAD_KEY_LEN);
114
+ if (newkeylen != sizeof(mctx->key))
116115 return -EINVAL;
117
- }
118116 mctx->key = le32_to_cpu(*(__le32 *)newkey);
119117 return 0;
120118 }
....@@ -124,10 +122,8 @@
124122 {
125123 struct crc_ctx *mctx = crypto_shash_ctx(tfm);
126124
127
- if (newkeylen != sizeof(mctx->key)) {
128
- crypto_shash_set_flags(tfm, CRYPTO_TFM_RES_BAD_KEY_LEN);
125
+ if (newkeylen != sizeof(mctx->key))
129126 return -EINVAL;
130
- }
131127 mctx->key = be32_to_cpu(*(__be32 *)newkey);
132128 return 0;
133129 }