diff options
Diffstat (limited to 'drivers/mtd/nand')
-rw-r--r-- | drivers/mtd/nand/fsl_elbc_nand.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/mtd/nand/fsl_elbc_nand.c b/drivers/mtd/nand/fsl_elbc_nand.c index b9f9f22cd860..cb12b67ce5ef 100644 --- a/drivers/mtd/nand/fsl_elbc_nand.c +++ b/drivers/mtd/nand/fsl_elbc_nand.c | |||
@@ -780,6 +780,8 @@ static int fsl_elbc_chip_remove(struct fsl_elbc_mtd *priv) | |||
780 | 780 | ||
781 | nand_release(&priv->mtd); | 781 | nand_release(&priv->mtd); |
782 | 782 | ||
783 | kfree(priv->mtd.name); | ||
784 | |||
783 | if (priv->vbase) | 785 | if (priv->vbase) |
784 | iounmap(priv->vbase); | 786 | iounmap(priv->vbase); |
785 | 787 | ||
@@ -840,6 +842,12 @@ static int fsl_elbc_chip_probe(struct fsl_elbc_ctrl *ctrl, | |||
840 | goto err; | 842 | goto err; |
841 | } | 843 | } |
842 | 844 | ||
845 | priv->mtd.name = kasprintf(GFP_KERNEL, "%x.flash", res.start); | ||
846 | if (!priv->mtd.name) { | ||
847 | ret = -ENOMEM; | ||
848 | goto err; | ||
849 | } | ||
850 | |||
843 | ret = fsl_elbc_chip_init(priv); | 851 | ret = fsl_elbc_chip_init(priv); |
844 | if (ret) | 852 | if (ret) |
845 | goto err; | 853 | goto err; |