]> Gentwo Git Trees - linux/.git/commit
mtd: rawnand: nuvoton: Fix an error handling path in ma35_nand_chips_init()
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Wed, 30 Jul 2025 19:47:46 +0000 (21:47 +0200)
committerMiquel Raynal <miquel.raynal@bootlin.com>
Thu, 28 Aug 2025 12:23:05 +0000 (14:23 +0200)
commit1eae113dd5ff5192cfd3e11b6ab7b96193b42c01
tree80e50d25d4e9964227fca9b78ddbda4c2d2c1752
parentf544bf03a771ee746b908e9a08ecb97c65a35055
mtd: rawnand: nuvoton: Fix an error handling path in ma35_nand_chips_init()

If a ma35_nand_chip_init() call fails, then a reference to 'nand_np' still
needs to be released.

Use for_each_child_of_node_scoped() to fix the issue.

Fixes: 5abb5d414d55 ("mtd: rawnand: nuvoton: add new driver for the Nuvoton MA35 SoC")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
drivers/mtd/nand/raw/nuvoton-ma35d1-nand-controller.c