Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 57b078a0 authored by Liu Shuo's avatar Liu Shuo Committed by Artem Bityutskiy
Browse files

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: default avatarLiu Shuo <b35362@freescale.com>
Signed-off-by: default avatarArtem Bityutskiy <dedekind1@gmail.com>
parent b4ca7473
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -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;
}