aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--crypto/api.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/crypto/api.c b/crypto/api.c
index 55af8bb0f050..33734fd9198f 100644
--- a/crypto/api.c
+++ b/crypto/api.c
@@ -48,8 +48,10 @@ EXPORT_SYMBOL_GPL(crypto_mod_get);
48 48
49void crypto_mod_put(struct crypto_alg *alg) 49void crypto_mod_put(struct crypto_alg *alg)
50{ 50{
51 struct module *module = alg->cra_module;
52
51 crypto_alg_put(alg); 53 crypto_alg_put(alg);
52 module_put(alg->cra_module); 54 module_put(module);
53} 55}
54EXPORT_SYMBOL_GPL(crypto_mod_put); 56EXPORT_SYMBOL_GPL(crypto_mod_put);
55 57