mtd: txx9ndfmc: Use nand_release to free resources
Linux-MTD Mailing List
linux-mtd at lists.infradead.org
Mon Nov 30 05:59:02 EST 2009
Gitweb: http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=6eb4feffb9d619a44fe434e777ef095a29cf4759
Commit: 6eb4feffb9d619a44fe434e777ef095a29cf4759
Parent: d6587feaf0ed7511b3d0b52bcaae8ecd0949d3af
Author: Atsushi Nemoto <anemo at mba.ocn.ne.jp>
AuthorDate: Mon Nov 2 23:40:48 2009 +0900
Committer: David Woodhouse <David.Woodhouse at intel.com>
CommitDate: Mon Nov 30 09:47:42 2009 +0000
mtd: txx9ndfmc: Use nand_release to free resources
This patch fixes memory leak on chip->bbt and chip->buffers.
Signed-off-by: Atsushi Nemoto <anemo at mba.ocn.ne.jp>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy at nokia.com>
Signed-off-by: David Woodhouse <David.Woodhouse at intel.com>
---
drivers/mtd/nand/txx9ndfmc.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/drivers/mtd/nand/txx9ndfmc.c b/drivers/mtd/nand/txx9ndfmc.c
index 73af832..863513c 100644
--- a/drivers/mtd/nand/txx9ndfmc.c
+++ b/drivers/mtd/nand/txx9ndfmc.c
@@ -429,11 +429,10 @@ static int __exit txx9ndfmc_remove(struct platform_device *dev)
chip = mtd->priv;
txx9_priv = chip->priv;
+ nand_release(mtd);
#ifdef CONFIG_MTD_PARTITIONS
- del_mtd_partitions(mtd);
kfree(drvdata->parts[i]);
#endif
- del_mtd_device(mtd);
kfree(txx9_priv->mtdname);
kfree(txx9_priv);
}
More information about the linux-mtd-cvs
mailing list