lkml.org 
[lkml]   [2006]   [Jul]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] hwrng: fix geode probe error unwind
Date
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.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-07-26 17:41    [W:0.038 / U:2.396 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site