mirror of
https://github.com/adulau/aha.git
synced 2024-12-27 19:26:25 +00:00
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>
This commit is contained in:
parent
d6587feaf0
commit
6eb4feffb9
1 changed files with 1 additions and 2 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue