summaryrefslogtreecommitdiff
path: root/crypto/rng.c
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/rng.c')
-rw-r--r--crypto/rng.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/crypto/rng.c b/crypto/rng.c
index ee1768c5a400..b021936094b0 100644
--- a/crypto/rng.c
+++ b/crypto/rng.c
@@ -226,5 +226,16 @@ void crypto_unregister_rngs(struct rng_alg *algs, int count)
}
EXPORT_SYMBOL_GPL(crypto_unregister_rngs);
+static void __exit rng_exit(void)
+{
+ int err;
+
+ err = crypto_del_default_rng();
+ if (err)
+ pr_err("Failed delete default RNG: %d\n", err);
+}
+
+module_exit(rng_exit);
+
MODULE_LICENSE("GPL");
MODULE_DESCRIPTION("Random Number Generator");