* [PATCH] hwrng: fix geode probe error unwind
@ 2006-07-26 15:37 Michael Buesch
0 siblings, 0 replies; only message in thread
From: Michael Buesch @ 2006-07-26 15:37 UTC (permalink / raw)
To: Andrew Morton; +Cc: linux-kernel
The geode hwrng leaks an iomapped resource, if hwrng_register() failes.
This fixes it.
Signed-off-by: Michael Buesch <mb@bu3sch.de>
Index: linux-2.6/drivers/char/hw_random/geode-rng.c
===================================================================
--- linux-2.6.orig/drivers/char/hw_random/geode-rng.c 2006-07-26 17:35:13.000000000 +0200
+++ linux-2.6/drivers/char/hw_random/geode-rng.c 2006-07-26 17:36:52.000000000 +0200
@@ -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)
--
Greetings Michael.
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2006-07-26 15:38 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-07-26 15:37 [PATCH] hwrng: fix geode probe error unwind Michael Buesch
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome