OpenCloudOS-Kernel/drivers/mtd
Miquel Raynal 0f0222d5ab mtd: rawnand: mtk: Fix init error path
[ Upstream commit 2073ae37d550ea32e8545edaa94ef10b4fef7235 ]

Reviewing a series converting the for_each_chil_of_node() loops into
their _scoped variants made me realize there was no cleanup of the
already registered NAND devices upon error which may leak memory on
systems with more than a chip when this error occurs. We should call the
_nand_chips_cleanup() function when this happens.

Fixes: 1d6b1e4649 ("mtd: mediatek: driver for MTK Smart Device")
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Pratyush Yadav <pratyush@kernel.org>
Reviewed-by: Matthias Brugger <matthias.bgg@kernel.org>
Link: https://lore.kernel.org/linux-mtd/20240826153019.67106-2-miquel.raynal@bootlin.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-10-04 16:29:07 +02:00
..
chips mtd: cfi_cmdset_0001: Byte swap OTP info 2023-11-28 17:20:06 +00:00
devices mtd: powernv: Add check devm_kasprintf() returned value 2024-10-04 16:29:07 +02:00
hyperbus
lpddr
maps mtd: maps: physmap-core: fix flash size larger than 32-bit 2024-03-26 18:19:52 -04:00
nand mtd: rawnand: mtk: Fix init error path 2024-10-04 16:29:07 +02:00
parsers mtd: partitions: redboot: Added conversion of operands to a larger type 2024-07-05 09:33:51 +02:00
spi-nor
tests mtd: make mtd_test.c a separate module 2024-08-03 08:54:00 +02:00
ubi ubi: eba: properly rollback inside self_check_eba 2024-08-03 08:54:23 +02:00
Kconfig
Makefile
ftl.c
inftlcore.c
inftlmount.c
mtd_blkdevs.c mtd: Fix gluebi NULL pointer dereference caused by ftl notifier 2024-01-25 15:35:15 -08:00
mtdblock.c
mtdblock_ro.c
mtdchar.c
mtdconcat.c
mtdcore.c mtd: core: Report error if first mtd_otp_size() call fails in mtd_otp_nvmem_add() 2024-06-12 11:11:58 +02:00
mtdcore.h
mtdoops.c
mtdpart.c
mtdpstore.c
mtdsuper.c
mtdswap.c
nftlcore.c
nftlmount.c
rfd_ftl.c
sm_ftl.c
sm_ftl.h
ssfdc.c