diff options
author | Michael Buesch <mb@bu3sch.de> | 2006-07-30 06:04:05 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-07-31 16:28:43 -0400 |
commit | 072d3d1acb452f4abd8d3d20af661f2e28854b59 (patch) | |
tree | 601f384e86afc5e8a24bbf3c836e30e686daad00 /drivers | |
parent | 58690664456b597796e58958861f365e096a1609 (diff) |
[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')
-rw-r--r-- | drivers/char/hw_random/geode-rng.c | 6 |
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: | |||
107 | if (err) { | 107 | if (err) { |
108 | printk(KERN_ERR PFX "RNG registering failed (%d)\n", | 108 | printk(KERN_ERR PFX "RNG registering failed (%d)\n", |
109 | err); | 109 | err); |
110 | goto out; | 110 | goto err_unmap; |
111 | } | 111 | } |
112 | out: | 112 | out: |
113 | return err; | 113 | return err; |
114 | |||
115 | err_unmap: | ||
116 | iounmap(mem); | ||
117 | goto out; | ||
114 | } | 118 | } |
115 | 119 | ||
116 | static void __exit mod_exit(void) | 120 | static void __exit mod_exit(void) |