diff options
author | Ingo Molnar <mingo@elte.hu> | 2009-02-24 15:52:27 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-02-24 15:52:27 -0500 |
commit | 87b203079ed949de52f0d92aeae20e5e0116c12f (patch) | |
tree | 1878756f936963822ed2d51a15db1da5814973e7 /crypto/shash.c | |
parent | 58105ef1857112a186696c9b8957020090226a28 (diff) | |
parent | a852cbfaaf8122827602027b1614971cfd832304 (diff) |
Merge branch 'x86/core' into core/percpu
Diffstat (limited to 'crypto/shash.c')
-rw-r--r-- | crypto/shash.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/crypto/shash.c b/crypto/shash.c index c9df367332ff..d5a2b619c55f 100644 --- a/crypto/shash.c +++ b/crypto/shash.c | |||
@@ -388,10 +388,15 @@ static int crypto_init_shash_ops_compat(struct crypto_tfm *tfm) | |||
388 | struct shash_desc *desc = crypto_tfm_ctx(tfm); | 388 | struct shash_desc *desc = crypto_tfm_ctx(tfm); |
389 | struct crypto_shash *shash; | 389 | struct crypto_shash *shash; |
390 | 390 | ||
391 | if (!crypto_mod_get(calg)) | ||
392 | return -EAGAIN; | ||
393 | |||
391 | shash = __crypto_shash_cast(crypto_create_tfm( | 394 | shash = __crypto_shash_cast(crypto_create_tfm( |
392 | calg, &crypto_shash_type)); | 395 | calg, &crypto_shash_type)); |
393 | if (IS_ERR(shash)) | 396 | if (IS_ERR(shash)) { |
397 | crypto_mod_put(calg); | ||
394 | return PTR_ERR(shash); | 398 | return PTR_ERR(shash); |
399 | } | ||
395 | 400 | ||
396 | desc->tfm = shash; | 401 | desc->tfm = shash; |
397 | tfm->exit = crypto_exit_shash_ops_compat; | 402 | tfm->exit = crypto_exit_shash_ops_compat; |