summaryrefslogtreecommitdiffstats
path: root/drivers/mtd/nand/edb7312.c
diff options
context:
space:
mode:
authorAmol Lad <amol@verismonetworks.com>2006-09-21 14:42:43 +0200
committerDavid Woodhouse <dwmw2@infradead.org>2006-09-22 11:24:31 +0200
commit25f0c659fe64832d8ee06aa623fffaad708dcf8b (patch)
treeb5740156ac2ce5e39aaaba32ddb21b03379abb48 /drivers/mtd/nand/edb7312.c
parent[MTD] Switch to pci_get_device and do ref counting (diff)
downloadlinux-25f0c659fe64832d8ee06aa623fffaad708dcf8b.tar.xz
linux-25f0c659fe64832d8ee06aa623fffaad708dcf8b.zip
ioremap balanced with iounmap for drivers/mtd subsystem
ioremap must be balanced by an iounmap and failing to do so can result in a memory leak. Tested (compilation only) with: - allmodconfig - Modifying drivers/mtd/maps/Kconfig and drivers/mtd/nand/Kconfig to make sure that the changed file is compiling without warning Signed-off-by: Amol Lad <amol@verismonetworks.com> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Diffstat (limited to 'drivers/mtd/nand/edb7312.c')
-rw-r--r--drivers/mtd/nand/edb7312.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/mtd/nand/edb7312.c b/drivers/mtd/nand/edb7312.c
index 516c0e5e564c..12017f3c6bd6 100644
--- a/drivers/mtd/nand/edb7312.c
+++ b/drivers/mtd/nand/edb7312.c
@@ -198,6 +198,9 @@ static void __exit ep7312_cleanup(void)
/* Release resources, unregister device */
nand_release(ap7312_mtd);
+ /* Release io resource */
+ iounmap((void *)this->IO_ADDR_R);
+
/* Free the MTD device structure */
kfree(ep7312_mtd);
}