Fix incorrect structure freeing in omap_nand_remove()
diff mbox

Message ID 1299803199-12790-1-git-send-email-green@liuxhacker.ru
State Awaiting Upstream, archived
Headers show

Commit Message

green@liuxhacker.ru March 11, 2011, 12:26 a.m. UTC
None

Patch
diff mbox

diff --git a/drivers/mtd/nand/omap2.c b/drivers/mtd/nand/omap2.c
index 4e33972..7c71716 100644
--- a/drivers/mtd/nand/omap2.c
+++ b/drivers/mtd/nand/omap2.c
@@ -1131,7 +1131,7 @@  static int omap_nand_remove(struct platform_device *pdev)
 	/* Release NAND device, its internal structures and partitions */
 	nand_release(&info->mtd);
 	iounmap(info->nand.IO_ADDR_R);
-	kfree(&info->mtd);
+	kfree(info);
 	return 0;
 }