X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=drivers%2Fmtd%2Fnand%2Fomap2.c;h=297c965c4245aa424ef79a112d9397390777f3d1;hb=8f864fc457e834f71de5b5b44401174170064593;hp=f745f00f3167d455f3d802a0b5ea9dc82a66b617;hpb=83dbb15e9cd78a3619e3db36777e2f81d09b2914;p=pandora-kernel.git diff --git a/drivers/mtd/nand/omap2.c b/drivers/mtd/nand/omap2.c index f745f00f3167..297c965c4245 100644 --- a/drivers/mtd/nand/omap2.c +++ b/drivers/mtd/nand/omap2.c @@ -1132,7 +1132,8 @@ 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); + release_mem_region(info->phys_base, NAND_IO_SIZE); + kfree(info); return 0; }