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>
This commit is contained in:
Corentin LABBE 2016-08-26 13:11:33 +02:00 committed by Herbert Xu
parent 055ae89038
commit fdec60d683
1 changed files with 2 additions and 1 deletions

View File

@ -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);