提交 57b078a0 编写于 作者: L Liu Shuo 提交者: Artem Bityutskiy

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: NLiu Shuo <b35362@freescale.com>
Signed-off-by: NArtem Bityutskiy <dedekind1@gmail.com>
上级 b4ca7473
...@@ -829,7 +829,6 @@ static int fsl_elbc_chip_remove(struct fsl_elbc_mtd *priv) ...@@ -829,7 +829,6 @@ static int fsl_elbc_chip_remove(struct fsl_elbc_mtd *priv)
elbc_fcm_ctrl->chips[priv->bank] = NULL; elbc_fcm_ctrl->chips[priv->bank] = NULL;
kfree(priv); kfree(priv);
kfree(elbc_fcm_ctrl);
return 0; return 0;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册