hwrng: fix geode probe error unwind
PATCH 1/1 hwrng: fix geode probe error unwind
The geode hwrng leaks an iomapped resource, if hwrng_register() failes. This fixes it.
Signed-off-by Michael Buesch <[email protected]>
drivers/char/hw_random/geode-rng.c +5 -1
@@ -107,10 +107,14 @@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)
Signature · 1 line
Greetings Michael.