summaryrefslogtreecommitdiff
path: root/drivers/char/hw_random/core.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-04-15 01:21:35 (GMT)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-04-15 01:21:35 (GMT)
commit2f093e2aa466d799c0952bfd1c6c68ff5d80fc17 (patch)
treee3d511aca536b7123d256b98a0ef8e74fc219498 /drivers/char/hw_random/core.c
parenta7761027656dc192b59617a6eb961e38097419ce (diff)
parent41ef2d5678d83af030125550329b6ae8b74618fa (diff)
downloadlinux-fsl-qoriq-2f093e2aa466d799c0952bfd1c6c68ff5d80fc17.tar.xz
Merge 3.9-rc7 into char-misc-next
We want the fixes in there. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/char/hw_random/core.c')
-rw-r--r--drivers/char/hw_random/core.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/char/hw_random/core.c b/drivers/char/hw_random/core.c
index 69ae597..a0f7724 100644
--- a/drivers/char/hw_random/core.c
+++ b/drivers/char/hw_random/core.c
@@ -380,6 +380,15 @@ void hwrng_unregister(struct hwrng *rng)
}
EXPORT_SYMBOL_GPL(hwrng_unregister);
+static void __exit hwrng_exit(void)
+{
+ mutex_lock(&rng_mutex);
+ BUG_ON(current_rng);
+ kfree(rng_buffer);
+ mutex_unlock(&rng_mutex);
+}
+
+module_exit(hwrng_exit);
MODULE_DESCRIPTION("H/W Random Number Generator (RNG) driver");
MODULE_LICENSE("GPL");