aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd/nand/fsl_elbc_nand.c
diff options
context:
space:
mode:
authorLiu Shuo <b35362@freescale.com>2011-06-27 21:50:51 -0400
committerArtem Bityutskiy <artem.bityutskiy@intel.com>2011-09-11 08:02:14 -0400
commit57b078a09bf0ab3f0babcfe6ecb2ac226d9178be (patch)
tree33cc32cff12c478f7d4fc8e184430f388f69b491 /drivers/mtd/nand/fsl_elbc_nand.c
parentb4ca74738ab6c9ed8190b06cd7bf785dc98c640e (diff)
mtd: nand: don't free the global data too early
The global data fsl_lbc_ctrl_dev->nand don't have to be freed in fsl_elbc_chip_remove(). The right place to do that is in fsl_elbc_nand_remove() if elbc_fcm_ctrl->counter is zero. Signed-off-by: Liu Shuo <b35362@freescale.com> Signed-off-by: Artem Bityutskiy <dedekind1@gmail.com>
Diffstat (limited to 'drivers/mtd/nand/fsl_elbc_nand.c')
-rw-r--r--drivers/mtd/nand/fsl_elbc_nand.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/drivers/mtd/nand/fsl_elbc_nand.c b/drivers/mtd/nand/fsl_elbc_nand.c
index 915b4a4c06c2..3c2f03c55cac 100644
--- a/drivers/mtd/nand/fsl_elbc_nand.c
+++ b/drivers/mtd/nand/fsl_elbc_nand.c
@@ -829,7 +829,6 @@ static int fsl_elbc_chip_remove(struct fsl_elbc_mtd *priv)
829 829
830 elbc_fcm_ctrl->chips[priv->bank] = NULL; 830 elbc_fcm_ctrl->chips[priv->bank] = NULL;
831 kfree(priv); 831 kfree(priv);
832 kfree(elbc_fcm_ctrl);
833 return 0; 832 return 0;
834} 833}
835 834