Commit 82e023ab authored by Axel Lin's avatar Axel Lin Committed by Artem Bityutskiy

mtd: fsmc_nand: fix a memory leak

In fsmc_nand_remove, we should call nand_release instead of
mtd_device_unregister to properly free bad block table memory
and bad block descriptor memory.
Signed-off-by: default avatarAxel Lin <axel.lin@gmail.com>
Signed-off-by: default avatarArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
parent 1a359192
......@@ -822,7 +822,7 @@ static int fsmc_nand_remove(struct platform_device *pdev)
platform_set_drvdata(pdev, NULL);
if (host) {
mtd_device_unregister(&host->mtd);
nand_release(&host->mtd);
clk_disable(host->clk);
clk_put(host->clk);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment