diff options
author | Atsushi Nemoto <anemo@mba.ocn.ne.jp> | 2009-11-02 15:40:48 +0100 |
---|---|---|
committer | David Woodhouse <David.Woodhouse@intel.com> | 2009-11-30 10:47:42 +0100 |
commit | 6eb4feffb9d619a44fe434e777ef095a29cf4759 (patch) | |
tree | b23ead3aecc88dffc0c41c466d518ccfddd23db4 | |
parent | mtd: ixp4xx map: use resource_size (diff) | |
download | linux-6eb4feffb9d619a44fe434e777ef095a29cf4759.tar.xz linux-6eb4feffb9d619a44fe434e777ef095a29cf4759.zip |
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>
-rw-r--r-- | 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 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) 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); } |