aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristophe Kerello <[email protected]>2020-01-23 09:22:48 +0100
committerMiquel Raynal <[email protected]>2020-03-09 14:49:14 +0100
commit009264605cdf1b12962c3a46f75818d05452e890 (patch)
tree3086e6ed3ac67411c22d932304f0ef4d47e8ddd6
parent43d8b6362378913bafbc54690474131568458c42 (diff)
mtd: rawnand: free the nand_device object
This patch releases the resources allocated in nanddev_init function. Fixes: a7ab085d7c16 ("mtd: rawnand: Initialize the nand_device object") Signed-off-by: Christophe Kerello <[email protected]> Signed-off-by: Miquel Raynal <[email protected]> Link: https://lore.kernel.org/linux-mtd/[email protected]
-rw-r--r--drivers/mtd/nand/raw/nand_base.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/mtd/nand/raw/nand_base.c b/drivers/mtd/nand/raw/nand_base.c
index 8ad4af99eea4..a3ed6c54963e 100644
--- a/drivers/mtd/nand/raw/nand_base.c
+++ b/drivers/mtd/nand/raw/nand_base.c
@@ -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);