Skip to content

Commit

Permalink
mtd: nand: don't free the global data too early
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Liu Shuo authored and Artem Bityutskiy committed Sep 11, 2011
1 parent b4ca747 commit 57b078a
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion drivers/mtd/nand/fsl_elbc_nand.c
Original file line number Diff line number Diff line change
Expand Up @@ -829,7 +829,6 @@ static int fsl_elbc_chip_remove(struct fsl_elbc_mtd *priv)

elbc_fcm_ctrl->chips[priv->bank] = NULL;
kfree(priv);
kfree(elbc_fcm_ctrl);
return 0;
}

Expand Down

0 comments on commit 57b078a

Please sign in to comment.