Skip to contentSkip to conversation

mtd: rawnand: free the nand_device object

PATCH Applied Christophe Kerello 2 participants 2 messages Jan 23, 2020 – Mar 10, 2020

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

This patch releases the resources allocated in nanddev_init function.

Fixes a7ab085d7c16 ("mtd: rawnand: Initialize the nand_device object")
---
 drivers/mtd/nand/raw/nand_base.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/mtd/nand/raw/nand_base.c +2 -0
index f64e3b6..47c6396 100644
@@ -5907,6 +5907,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);
Signature · 1 line
1.9.1