linux-yocto/drivers/mtd
Erick Karanja 75287554a9 mtd: rawnand: atmel: Fix error handling path in atmel_nand_controller_add_nands
[ Upstream commit 8ed4728eb9f10b57c3eb02e0f6933a89ffcb8a91 ]

In case of a jump to the  err label due to atmel_nand_create() or
atmel_nand_controller_add_nand() failure, the reference to nand_np
need to be released

Use for_each_child_of_node_scoped() to fix the issue.

Fixes: f88fc122cc ("mtd: nand: Cleanup/rework the atmel_nand driver")

Signed-off-by: Erick Karanja <karanja99erick@gmail.com>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2025-10-15 11:58:06 +02:00
..
chips
devices
hyperbus
lpddr
maps
nand mtd: rawnand: atmel: Fix error handling path in atmel_nand_controller_add_nands 2025-10-15 11:58:06 +02:00
parsers
spi-nor mtd: spi-nor: Fix spi_nor_try_unlock_all() 2025-08-28 16:28:36 +02:00
tests
ubi
ftl.c mtd: fix possible integer overflow in erase_xfer() 2025-08-15 12:08:51 +02:00
inftlcore.c mtd: inftlcore: Add error check for inftl_read_oob() 2025-04-25 10:45:29 +02:00
inftlmount.c
Kconfig
Makefile
mtd_blkdevs.c
mtdblock_ro.c
mtdblock.c
mtdchar.c
mtdconcat.c
mtdcore.c
mtdcore.h
mtdoops.c
mtdpart.c
mtdpstore.c mtd: Replace kcalloc() with devm_kcalloc() 2025-04-25 10:45:25 +02:00
mtdsuper.c
mtdswap.c
nftlcore.c
nftlmount.c
rfd_ftl.c
sm_ftl.c
sm_ftl.h
ssfdc.c