aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc/crypto/crc32c_glue.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/sparc/crypto/crc32c_glue.c')
-rw-r--r--arch/sparc/crypto/crc32c_glue.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/arch/sparc/crypto/crc32c_glue.c b/arch/sparc/crypto/crc32c_glue.c
index 1299073285a3..4e9323229e71 100644
--- a/arch/sparc/crypto/crc32c_glue.c
+++ b/arch/sparc/crypto/crc32c_glue.c
@@ -33,10 +33,8 @@ static int crc32c_sparc64_setkey(struct crypto_shash *hash, const u8 *key,
{
u32 *mctx = crypto_shash_ctx(hash);
- if (keylen != sizeof(u32)) {
- crypto_shash_set_flags(hash, CRYPTO_TFM_RES_BAD_KEY_LEN);
+ if (keylen != sizeof(u32))
return -EINVAL;
- }
*(__le32 *)mctx = le32_to_cpup((__le32 *)key);
return 0;
}