Title: [9077] trunk/drivers/mtd/nand/bf5xx_nand.c: bf5xx_nand: do not try to free info->mtd since it isnt dynamically allocated
- Revision
- 9077
- Author
- vapier
- Date
- 2010-08-11 17:19:40 -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: trunk/drivers/mtd/nand/bf5xx_nand.c (9076 => 9077)
--- trunk/drivers/mtd/nand/bf5xx_nand.c 2010-08-10 19:07:58 UTC (rev 9076)
+++ trunk/drivers/mtd/nand/bf5xx_nand.c 2010-08-11 21:19:40 UTC (rev 9077)
@@ -691,7 +691,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);
@@ -699,11 +698,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