Commit 00926460 authored by Christophe Kerello's avatar Christophe Kerello Committed by Miquel Raynal

mtd: rawnand: free the nand_device object

This patch releases the resources allocated in nanddev_init function.

Fixes: a7ab085d ("mtd: rawnand: Initialize the nand_device object")
Signed-off-by: default avatarChristophe Kerello <christophe.kerello@st.com>
Signed-off-by: default avatarMiquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/linux-mtd/1579767768-32295-1-git-send-email-christophe.kerello@st.com
parent 43d8b636
......@@ -5912,6 +5912,8 @@ void nand_cleanup(struct nand_chip *chip)
chip->ecc.algo == NAND_ECC_BCH)
nand_bch_free((struct nand_bch_control *)chip->ecc.priv);
nanddev_cleanup(&chip->base);
/* Free bad block table memory */
kfree(chip->bbt);
kfree(chip->data_buf);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment