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>
此提交包含在:
Amol Lad
2006-09-21 18:12:43 +05:30
提交者 David Woodhouse
父節點 dd8e9ed6ed
當前提交 25f0c659fe
共有 15 個檔案被更改,包括 119 行新增15 行删除

查看文件

@@ -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);
}