mtd: rawnand: sunxi: Clean up chips after failed init
authorSamuel Holland <samuel@sholland.org>
Thu, 29 Dec 2022 18:15:20 +0000 (12:15 -0600)
committerMiquel Raynal <miquel.raynal@bootlin.com>
Mon, 2 Jan 2023 11:14:21 +0000 (12:14 +0100)
commit6d7fea226b238b95d69faba49b8faf73d6e8c469
tree53148a4bc32ba323f3449b351d756eed6937da1d
parent68c18dae68881054ed5426c00f0ed351b1db9bc0
mtd: rawnand: sunxi: Clean up chips after failed init

If a chip fails to initialize, we need to clean up any chips that were
already initialized/registered.

Fixes: 1fef62c1423b ("mtd: nand: add sunxi NAND flash controller support")
Signed-off-by: Samuel Holland <samuel@sholland.org>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/linux-mtd/20221229181526.53766-2-samuel@sholland.org
drivers/mtd/nand/raw/sunxi_nand.c