]> 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 12:55:12 +0000 (13:55 +0100)
commitf6f13e468b725efa424959b04f45c85a754747b6
treeef74ae007183945647701f174bdd9ed083a05024
parent7c3ba62a4d29fbafd2f4f0dfe8437fcdedec6428
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