spi: amlogic-spifc-a1: Handle devm_pm_runtime_enable() errors
PATCH 1/1 spi: amlogic-spifc-a1: Handle devm_pm_runtime_enable() errors
devm_pm_runtime_enable() can fail due to memory allocation. The current code ignores its return value, potentially causing runtime PM operations to fail silently after autosuspend configuration.
Check the return value of devm_pm_runtime_enable() and return on failure.
--- drivers/spi/spi-amlogic-spifc-a1.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/spi/spi-amlogic-spifc-a1.c +3 -1
@@ -353,7 +353,9 @@ static int amlogic_spifc_a1_probe(struct platform_device *pdev)pm_runtime_set_autosuspend_delay (spifc->dev,500 );pm_runtime_use_autosuspend (spifc->dev); -devm_pm_runtime_enable (spifc->dev); + ret =devm_pm_runtime_enable (spifc->dev); +if (ret) +return ret; ctrl->num_chipselect =1 ; ctrl->dev.of_node = pdev->dev.of_node;
Signature · 1 line
2.50.1.windows.1
Mark Brown
maintainerQuoted 8 lines · Haotian Zhang
devm_pm_runtime_enable()can fail due to memory allocation. The current code ignores its return value, potentially causing runtime PM operations to fail silently after autosuspend configuration.Check the return value of
devm_pm_runtime_enable()and return on failure.[...]
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git for-next
Thanks!
[1/1] spi: amlogic-spifc-a1: Handle devm_pm_runtime_enable() errors
commit: a90903c2a3c38bce475f46ea3f93dbf6a9971553
All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying to this mail.
Thanks,
Mark