linux/drivers/mtd/nand
Haotian Zhang 44309fda9c mtd: rawnand: renesas: Handle devm_pm_runtime_enable() errors
[ Upstream commit a3623e1ae1 ]

devm_pm_runtime_enable() can fail due to memory allocation failures.
The current code ignores its return value and proceeds with
pm_runtime_resume_and_get(), which may operate on incorrectly
initialized runtime PM state.

Check the return value of devm_pm_runtime_enable() and return the
error code if it fails.

Fixes: 6a2277a0eb ("mtd: rawnand: renesas: Use runtime PM instead of the raw clock API")
Signed-off-by: Haotian Zhang <vulab@iscas.ac.cn>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
History 2025-12-18 14:03:26 +01:00
..
onenand mtd: onenand: Pass correct pointer to IRQ handler 2025-11-03 11:37:57 +01:00
raw mtd: rawnand: renesas: Handle devm_pm_runtime_enable() errors 2025-12-18 14:03:26 +01:00
spi mtd: spinand: fmsh: remove QE bit for FM25S01A flash 2025-11-03 11:33:04 +01:00
bbt.c mtd: nand: bbt: Use the bitmap API to allocate bitmaps 2022-09-20 10:06:58 +02:00
core.c mtd: nand: move nand_check_erased_ecc_chunk() to nand/core 2025-09-18 10:32:00 +02:00
ecc-mtk.c mtd: nand: ecc-mtk: Add ECC support fot MT7986 IC 2023-02-03 19:09:44 +01:00
ecc-mxic.c mtd: nand: ecc-mxic: Lower log level during init 2025-09-18 10:31:56 +02:00
ecc-realtek.c mtd: rawnand: realtek: Make rtl_ecc_engine_ops const 2025-10-22 11:54:42 +02:00
ecc-sw-bch.c mtd: spinand: Constify struct nand_ecc_engine_ops 2024-10-21 11:55:50 +02:00
ecc-sw-hamming.c mtd: spinand: Constify struct nand_ecc_engine_ops 2024-10-21 11:55:50 +02:00
ecc.c mtd: nand: ecc: fix "writen"->"written" 2025-09-10 10:02:57 +02:00
Kconfig mtd: nand: MTD_NAND_ECC_REALTEK should depend on HAS_DMA 2025-10-22 11:54:29 +02:00
Makefile mtd: nand: realtek-ecc: Add Realtek external ECC engine support 2025-09-29 17:54:33 +02:00
qpic_common.c mtd: nand: qpic_common: use {cmd,data}_sgl_nitems for sg_init_table() 2025-08-28 14:23:20 +02:00