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>
此提交包含在:
@@ -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);
|
||||
}
|
||||
|
新增問題並參考
封鎖使用者