summaryrefslogtreecommitdiff
path: root/drivers/char/hw_random/amd-rng.c
diff options
context:
space:
mode:
authorCorentin LABBE <clabbe.montjoie@gmail.com>2016-08-26 14:11:33 +0300
committerHerbert Xu <herbert@gondor.apana.org.au>2016-08-31 18:00:45 +0300
commitfdec60d683568c8e79457c106fa6642ca7ae95f3 (patch)
tree2ba14cbed6c5f24686fdae9112b51fa2f15f5e2d /drivers/char/hw_random/amd-rng.c
parent055ae890388ad2b02a53d5c3e1f60f976989e34e (diff)
downloadlinux-fdec60d683568c8e79457c106fa6642ca7ae95f3.tar.xz
hwrng: amd - release_region must be called after hwrng_unregister
The driver release the memory region before being sure that nobody use it. This patch made hwrng_unregister ran before any release was done. Signed-off-by: LABBE Corentin <clabbe.montjoie@gmail.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/char/hw_random/amd-rng.c')
-rw-r--r--drivers/char/hw_random/amd-rng.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/char/hw_random/amd-rng.c b/drivers/char/hw_random/amd-rng.c
index de82fe3643a5..383e1974234d 100644
--- a/drivers/char/hw_random/amd-rng.c
+++ b/drivers/char/hw_random/amd-rng.c
@@ -151,8 +151,9 @@ static void __exit mod_exit(void)
{
u32 pmbase = (unsigned long)amd_rng.priv;
- release_region(pmbase + 0xF0, 8);
hwrng_unregister(&amd_rng);
+
+ release_region(pmbase + 0xF0, 8);
}
module_init(mod_init);