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:
parent
055ae89038
commit
fdec60d683
|
@ -151,8 +151,9 @@ static void __exit mod_exit(void)
|
||||||
{
|
{
|
||||||
u32 pmbase = (unsigned long)amd_rng.priv;
|
u32 pmbase = (unsigned long)amd_rng.priv;
|
||||||
|
|
||||||
release_region(pmbase + 0xF0, 8);
|
|
||||||
hwrng_unregister(&amd_rng);
|
hwrng_unregister(&amd_rng);
|
||||||
|
|
||||||
|
release_region(pmbase + 0xF0, 8);
|
||||||
}
|
}
|
||||||
|
|
||||||
module_init(mod_init);
|
module_init(mod_init);
|
||||||
|
|
Loading…
Reference in New Issue