]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - crypto/crc32_generic.c
Merge tag 'riscv-for-linus-5.6-mw0' of git://git.kernel.org/pub/scm/linux/kernel...
[linux.git] / crypto / crc32_generic.c
index 9e97912280bdf30df037cff92afcb2be99ff66b8..0e103fb5dd777c625d554114fe32a574674dae42 100644 (file)
@@ -60,10 +60,8 @@ static int crc32_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;
-       }
        *mctx = get_unaligned_le32(key);
        return 0;
 }