summaryrefslogtreecommitdiffstats
path: root/drivers/char/hw_random
diff options
context:
space:
mode:
authorMichael Buesch <mb@bu3sch.de>2006-07-30 12:04:05 +0200
committerLinus Torvalds <torvalds@g5.osdl.org>2006-07-31 22:28:43 +0200
commit072d3d1acb452f4abd8d3d20af661f2e28854b59 (patch)
tree601f384e86afc5e8a24bbf3c836e30e686daad00 /drivers/char/hw_random
parent[PATCH] hwrng: fix intel probe error unwind (diff)
downloadlinux-072d3d1acb452f4abd8d3d20af661f2e28854b59.tar.xz
linux-072d3d1acb452f4abd8d3d20af661f2e28854b59.zip
[PATCH] hwrng: fix geode probe error unwind
The geode hwrng leaks an iomapped resource, if hwrng_register() fails. This fixes it. Signed-off-by: Michael Buesch <mb@bu3sch.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/char/hw_random')
-rw-r--r--drivers/char/hw_random/geode-rng.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/char/hw_random/geode-rng.c b/drivers/char/hw_random/geode-rng.c
index be61f22ee7bb..d37ced0d132b 100644
--- a/drivers/char/hw_random/geode-rng.c
+++ b/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)