Commit 43c20144 authored by Boris BREZILLON's avatar Boris BREZILLON Committed by Greg Kroah-Hartman

mtd: nand: sunxi: fix sunxi_nand_chips_cleanup()

commit 8e375ccd upstream.

The sunxi_nand_chips_cleanup() function is missing a call to list_del()
which generates a double free error.
Reported-by: default avatarPriit Laes <plaes@plaes.org>
Signed-off-by: default avatarBoris Brezillon <boris.brezillon@free-electrons.com>
Fixes: 1fef62c1 ("mtd: nand: add sunxi NAND flash controller support")
Tested-by: default avatarPriit Laes <plaes@plaes.org>
Signed-off-by: default avatarBrian Norris <computersforpeace@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 1f58388f
......@@ -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);
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment