diff options
| -rw-r--r-- | drivers/mtd/nand/bf5xx_nand.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/drivers/mtd/nand/bf5xx_nand.c b/drivers/mtd/nand/bf5xx_nand.c index 162c5ea2b773..6fbeefa3a766 100644 --- a/drivers/mtd/nand/bf5xx_nand.c +++ b/drivers/mtd/nand/bf5xx_nand.c | |||
| @@ -682,7 +682,6 @@ static int __devinit bf5xx_nand_add_partition(struct bf5xx_nand_info *info) | |||
| 682 | static int __devexit bf5xx_nand_remove(struct platform_device *pdev) | 682 | static int __devexit bf5xx_nand_remove(struct platform_device *pdev) |
| 683 | { | 683 | { |
| 684 | struct bf5xx_nand_info *info = to_nand_info(pdev); | 684 | struct bf5xx_nand_info *info = to_nand_info(pdev); |
| 685 | struct mtd_info *mtd = NULL; | ||
| 686 | 685 | ||
| 687 | platform_set_drvdata(pdev, NULL); | 686 | platform_set_drvdata(pdev, NULL); |
| 688 | 687 | ||
| @@ -690,11 +689,7 @@ static int __devexit bf5xx_nand_remove(struct platform_device *pdev) | |||
| 690 | * and their partitions, then go through freeing the | 689 | * and their partitions, then go through freeing the |
| 691 | * resources used | 690 | * resources used |
| 692 | */ | 691 | */ |
| 693 | mtd = &info->mtd; | 692 | nand_release(&info->mtd); |
| 694 | if (mtd) { | ||
| 695 | nand_release(mtd); | ||
| 696 | kfree(mtd); | ||
| 697 | } | ||
| 698 | 693 | ||
| 699 | peripheral_free_list(bfin_nfc_pin_req); | 694 | peripheral_free_list(bfin_nfc_pin_req); |
| 700 | bf5xx_nand_dma_remove(info); | 695 | bf5xx_nand_dma_remove(info); |
