hc
2024-05-10 748e4f3d702def1a4bff191e0cf93b6a05340f01
kernel/arch/sparc/crypto/crc32c_glue.c
....@@ -1,3 +1,4 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /* Glue code for CRC32C optimized for sparc64 crypto opcodes.
23 *
34 * This is based largely upon arch/x86/crypto/crc32c-intel.c
....@@ -32,10 +33,8 @@
3233 {
3334 u32 *mctx = crypto_shash_ctx(hash);
3435
35
- if (keylen != sizeof(u32)) {
36
- crypto_shash_set_flags(hash, CRYPTO_TFM_RES_BAD_KEY_LEN);
36
+ if (keylen != sizeof(u32))
3737 return -EINVAL;
38
- }
3938 *(__le32 *)mctx = le32_to_cpup((__le32 *)key);
4039 return 0;
4140 }