Skip to content

Commit

Permalink
mtd: nand: sunxi: fix sunxi_nand_chips_cleanup()
Browse files Browse the repository at this point in the history
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: 1fef62c ("mtd: nand: add sunxi NAND flash controller support")
Tested-by: Priit Laes <plaes@plaes.org>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
  • Loading branch information
Boris BREZILLON authored and Brian Norris committed Sep 22, 2015
1 parent 03a0e8a commit 8e375cc
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/mtd/nand/sunxi_nand.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}

Expand Down

0 comments on commit 8e375cc

Please sign in to comment.