public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] txx9ndfmc: Use nand_release() to free resources
@ 2009-11-02 14:40 Atsushi Nemoto
  2009-11-09  9:40 ` Artem Bityutskiy
  0 siblings, 1 reply; 2+ messages in thread
From: Atsushi Nemoto @ 2009-11-02 14:40 UTC (permalink / raw)
  To: linux-mtd; +Cc: dwmw2, linux-kernel

This patch fixes memory leak on chip->bbt and chip->buffers.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
---
 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);
 	}
-- 
1.5.6.5


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] txx9ndfmc: Use nand_release() to free resources
  2009-11-02 14:40 [PATCH] txx9ndfmc: Use nand_release() to free resources Atsushi Nemoto
@ 2009-11-09  9:40 ` Artem Bityutskiy
  0 siblings, 0 replies; 2+ messages in thread
From: Artem Bityutskiy @ 2009-11-09  9:40 UTC (permalink / raw)
  To: Atsushi Nemoto; +Cc: linux-mtd, dwmw2, linux-kernel

On Mon, 2009-11-02 at 23:40 +0900, Atsushi Nemoto wrote:
> This patch fixes memory leak on chip->bbt and chip->buffers.
> 
> Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
> ---
>  drivers/mtd/nand/txx9ndfmc.c |    3 +--
>  1 files changed, 1 insertions(+), 2 deletions(-)

Taken to the l2-mtd-2.6 tree, thanks. 

-- 
Best Regards,
Artem Bityutskiy (Артём Битюцкий)


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-11-09  9:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-11-02 14:40 [PATCH] txx9ndfmc: Use nand_release() to free resources Atsushi Nemoto
2009-11-09  9:40 ` Artem Bityutskiy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox