]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
mtd: rawnand: renesas: Handle devm_pm_runtime_enable() errors
authorHaotian Zhang <vulab@iscas.ac.cn>
Sun, 23 Nov 2025 16:35:51 +0000 (00:35 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 18 Dec 2025 13:03:26 +0000 (14:03 +0100)
commit44309fda9c60d792cdd4da96d35c4af0895dfbe7
tree77d9dc2c42246c733d7439bd0a8e89e3f2f75c8e
parent3a11d8ae00c9e4cda68f331fafd3a79549fea626
mtd: rawnand: renesas: Handle devm_pm_runtime_enable() errors

[ Upstream commit a3623e1ae1ed6be4d49b2ccb9996a9d2b65c1828 ]

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: 6a2277a0ebe7 ("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>
drivers/mtd/nand/raw/renesas-nand-controller.c