Title: [9078] branches/2009R1/drivers/mtd/nand/bf5xx_nand.c: bf5xx_nand: do not try to free info->mtd since it isnt dynamically allocated
Revision
9078
Author
vapier
Date
2010-08-11 17:20:04 -0400 (Wed, 11 Aug 2010)

Log Message

bf5xx_nand: do not try to free info->mtd since it isnt dynamically allocated

Modified Paths

Diff

Modified: branches/2009R1/drivers/mtd/nand/bf5xx_nand.c (9077 => 9078)


--- branches/2009R1/drivers/mtd/nand/bf5xx_nand.c	2010-08-11 21:19:40 UTC (rev 9077)
+++ branches/2009R1/drivers/mtd/nand/bf5xx_nand.c	2010-08-11 21:20:04 UTC (rev 9078)
@@ -654,7 +654,6 @@
 static int __devexit bf5xx_nand_remove(struct platform_device *pdev)
 {
 	struct bf5xx_nand_info *info = to_nand_info(pdev);
-	struct mtd_info *mtd = NULL;
 
 	platform_set_drvdata(pdev, NULL);
 
@@ -662,11 +661,7 @@
 	 * and their partitions, then go through freeing the
 	 * resources used
 	 */
-	mtd = &info->mtd;
-	if (mtd) {
-		nand_release(mtd);
-		kfree(mtd);
-	}
+	nand_release(&info->mtd);
 
 	peripheral_free_list(bfin_nfc_pin_req);
 	bf5xx_nand_dma_remove(info);
_______________________________________________
Linux-kernel-commits mailing list
[email protected]
https://blackfin.uclinux.org/mailman/listinfo/linux-kernel-commits

Reply via email to