From: Michael Buesch The geode hwrng leaks an iomapped resource, if hwrng_register() fails. This fixes it. Signed-off-by: Michael Buesch Signed-off-by: Andrew Morton --- drivers/char/hw_random/geode-rng.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff -puN drivers/char/hw_random/geode-rng.c~hwrng-fix-geode-probe-error-unwind drivers/char/hw_random/geode-rng.c --- a/drivers/char/hw_random/geode-rng.c~hwrng-fix-geode-probe-error-unwind +++ a/drivers/char/hw_random/geode-rng.c @@ -107,10 +107,14 @@ found: if (err) { printk(KERN_ERR PFX "RNG registering failed (%d)\n", err); - goto out; + goto err_unmap; } out: return err; + +err_unmap: + iounmap(mem); + goto out; } static void __exit mod_exit(void) _