summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCorentin LABBE <clabbe.montjoie@gmail.com>2016-08-26 13:11:33 +0200
committerHerbert Xu <herbert@gondor.apana.org.au>2016-08-31 23:00:45 +0800
commitfdec60d683568c8e79457c106fa6642ca7ae95f3 (patch)
tree2ba14cbed6c5f24686fdae9112b51fa2f15f5e2d
parent055ae890388ad2b02a53d5c3e1f60f976989e34e (diff)
downloadop-kernel-dev-fdec60d683568c8e79457c106fa6642ca7ae95f3.zip
op-kernel-dev-fdec60d683568c8e79457c106fa6642ca7ae95f3.tar.gz
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>
-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 de82fe3..383e1974 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);
OpenPOWER on IntegriCloud