Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6eb4feff authored by Atsushi Nemoto's avatar Atsushi Nemoto Committed by David Woodhouse
Browse files

mtd: txx9ndfmc: Use nand_release to free resources



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

Signed-off-by: default avatarAtsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: default avatarArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
Signed-off-by: default avatarDavid Woodhouse <David.Woodhouse@intel.com>
parent d6587fea
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -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);
	}