summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoris BREZILLON <boris.brezillon@free-electrons.com>2015-09-13 18:14:43 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-10-22 14:49:28 -0700
commita03e4517ee5211298ecd102813ad12ea8b843129 (patch)
treeb77d8de1b0664c7fe40152fb5efc0b4610433f03
parent8747171eb44f9f4dc354800a3ff5b64c22182233 (diff)
downloadlwn-a03e4517ee5211298ecd102813ad12ea8b843129.tar.gz
lwn-a03e4517ee5211298ecd102813ad12ea8b843129.zip
mtd: nand: sunxi: fix sunxi_nand_chips_cleanup()
commit 8e375ccda31ccc73b087134e263c48d2114534f4 upstream. 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> 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> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-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 6f93b2990d25..4f67bbe30fe5 100644
--- a/drivers/mtd/nand/sunxi_nand.c
+++ b/drivers/mtd/nand/sunxi_nand.c
@@ -1312,6 +1312,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);
}
}