aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd/nand/txx9ndfmc.c
diff options
context:
space:
mode:
authorAtsushi Nemoto <anemo@mba.ocn.ne.jp>2009-11-02 09:40:48 -0500
committerDavid Woodhouse <David.Woodhouse@intel.com>2009-11-30 04:47:42 -0500
commit6eb4feffb9d619a44fe434e777ef095a29cf4759 (patch)
treeb23ead3aecc88dffc0c41c466d518ccfddd23db4 /drivers/mtd/nand/txx9ndfmc.c
parentd6587feaf0ed7511b3d0b52bcaae8ecd0949d3af (diff)
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@mba.ocn.ne.jp> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Diffstat (limited to 'drivers/mtd/nand/txx9ndfmc.c')
-rw-r--r--drivers/mtd/nand/txx9ndfmc.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/mtd/nand/txx9ndfmc.c b/drivers/mtd/nand/txx9ndfmc.c
index 73af8324d0d0..863513c3b69a 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)
429 chip = mtd->priv; 429 chip = mtd->priv;
430 txx9_priv = chip->priv; 430 txx9_priv = chip->priv;
431 431
432 nand_release(mtd);
432#ifdef CONFIG_MTD_PARTITIONS 433#ifdef CONFIG_MTD_PARTITIONS
433 del_mtd_partitions(mtd);
434 kfree(drvdata->parts[i]); 434 kfree(drvdata->parts[i]);
435#endif 435#endif
436 del_mtd_device(mtd);
437 kfree(txx9_priv->mtdname); 436 kfree(txx9_priv->mtdname);
438 kfree(txx9_priv); 437 kfree(txx9_priv);
439 } 438 }