aboutsummaryrefslogtreecommitdiff
path: root/crypto/api.c
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/api.c')
-rw-r--r--crypto/api.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/crypto/api.c b/crypto/api.c
index 55af8bb0f05..33734fd9198 100644
--- a/crypto/api.c
+++ b/crypto/api.c
@@ -48,8 +48,10 @@ EXPORT_SYMBOL_GPL(crypto_mod_get);
void crypto_mod_put(struct crypto_alg *alg)
{
+ struct module *module = alg->cra_module;
+
crypto_alg_put(alg);
- module_put(alg->cra_module);
+ module_put(module);
}
EXPORT_SYMBOL_GPL(crypto_mod_put);