aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/api.c
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/api.c')
-rw-r--r--crypto/api.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/crypto/api.c b/crypto/api.c
index 0a0f41ef255f..d06e33270abe 100644
--- a/crypto/api.c
+++ b/crypto/api.c
@@ -235,8 +235,12 @@ static int crypto_init_ops(struct crypto_tfm *tfm, u32 type, u32 mask)
235 return crypto_init_cipher_ops(tfm); 235 return crypto_init_cipher_ops(tfm);
236 236
237 case CRYPTO_ALG_TYPE_DIGEST: 237 case CRYPTO_ALG_TYPE_DIGEST:
238 return crypto_init_digest_ops(tfm); 238 if ((mask & CRYPTO_ALG_TYPE_HASH_MASK) !=
239 239 CRYPTO_ALG_TYPE_HASH_MASK)
240 return crypto_init_digest_ops_async(tfm);
241 else
242 return crypto_init_digest_ops(tfm);
243
240 case CRYPTO_ALG_TYPE_COMPRESS: 244 case CRYPTO_ALG_TYPE_COMPRESS:
241 return crypto_init_compress_ops(tfm); 245 return crypto_init_compress_ops(tfm);
242 246