aboutsummaryrefslogtreecommitdiff
path: root/drivers/mtd/nand/sunxi_nand.c
diff options
context:
space:
mode:
authorBoris BREZILLON <boris.brezillon@free-electrons.com>2015-09-13 18:14:43 +0200
committerBrian Norris <computersforpeace@gmail.com>2015-09-21 17:11:59 -0700
commit8e375ccda31ccc73b087134e263c48d2114534f4 (patch)
tree3f28bff5bbb1c551eedcc26e796c528c10e4afd1 /drivers/mtd/nand/sunxi_nand.c
parent03a0e8a7c5ea29b5c4e72dfd64900b47a8fb6f2d (diff)
mtd: nand: sunxi: fix sunxi_nand_chips_cleanup()
The sunxi_nand_chips_cleanup() function is missing a call to list_del() which generates a double free error. Reported-by: Priit Laes <plaes@plaes.org> Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com> Cc: <stable@vger.kernel.org> # 3.19+ Fixes: 1fef62c1423b ("mtd: nand: add sunxi NAND flash controller support") Tested-by: Priit Laes <plaes@plaes.org> Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Diffstat (limited to 'drivers/mtd/nand/sunxi_nand.c')
-rw-r--r--drivers/mtd/nand/sunxi_nand.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/mtd/nand/sunxi_nand.c b/drivers/mtd/nand/sunxi_nand.c
index 279cafd9d7f7..e7d333c162be 100644
--- a/drivers/mtd/nand/sunxi_nand.c
+++ b/drivers/mtd/nand/sunxi_nand.c
@@ -1381,6 +1381,7 @@ static void sunxi_nand_chips_cleanup(struct sunxi_nfc *nfc)
node);
nand_release(&chip->mtd);
sunxi_nand_ecc_cleanup(&chip->nand.ecc);
+ list_del(&chip->node);
}
}