Whamcloud - gitweb
LU-9859 tracefile: convert list_for_each_entry_safe() to while(!list_empty())
[fs/lustre-release.git] / libcfs / libcfs / linux-crypto-adler.c
index 44bf374..5b21ef7 100644 (file)
@@ -51,10 +51,9 @@ static int adler32_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 = *(u32 *)key;
        return 0;
 }
@@ -119,7 +118,7 @@ static struct shash_alg alg = {
                .cra_priority           = 100,
                .cra_blocksize          = CHKSUM_BLOCK_SIZE,
                .cra_ctxsize            = sizeof(u32),
-               .cra_module             = THIS_MODULE,
+               .cra_module             = NULL,
                .cra_init               = adler32_cra_init,
        }
 };