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 memory: renesas-rpc-if: Remove Runtime PM wrappers 2023-01-23 11:48:00 +01:00
lpddr mtd: lpddr2_nvm: Convert to devm_platform_ioremap_resource() 2023-07-12 14:08:26 +02:00
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 Core MTD changes: 2023-09-03 09:59:53 -07:00
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 mtd: inftlcore: fix repeated words in comments 2022-11-07 17:14:21 +01:00
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: make warning messages ratelimited 2023-07-27 17:16:14 +02:00
mtdblock_ro.c mtdblock: make warning messages ratelimited 2023-07-27 17:16:14 +02:00
mtdchar.c mtdchar: mark bits of ioctl handler noinline 2023-06-01 18:12:31 +02:00
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 mtd: use refcount to prevent corruption 2023-07-12 13:30:08 +02:00
mtdoops.c mtd: mtdoops: panic caused mtdoops to call mtdoops_erase function immediately 2022-11-07 17:08:00 +01:00
mtdpart.c mtd: use refcount to prevent corruption 2023-07-12 13:30:08 +02:00
mtdpstore.c
mtdsuper.c mtd: key superblock by device number 2023-08-31 12:47:15 +02:00
mtdswap.c
nftlcore.c
nftlmount.c
rfd_ftl.c
sm_ftl.c mtd: sm_ftl: Fix typos in comments 2023-06-22 23:00:43 +02:00
sm_ftl.h
ssfdc.c