* [PATCH] spi: mtk-nor: fix runtime PM usage count leak in probe error path
@ 2026-09-04 15:51 Felix Gu
2026-09-04 18:49 ` Mark Brown
0 siblings, 1 reply; 2+ messages in thread
From: Felix Gu @ 2026-09-04 15:51 UTC (permalink / raw)
To: Mark Brown, Matthias Brugger, AngeloGioacchino Del Regno,
Ikjoon Jang
Cc: linux-spi, linux-kernel, linux-arm-kernel, linux-mediatek,
Felix Gu
mtk_nor_probe() takes a runtime PM reference with
pm_runtime_get_noresume() before registering the controller, but the
error path never drops it.
Balance the get with pm_runtime_put_noidle() in the error path.
Fixes: 3bfd9103c7af ("spi: spi-mtk-nor: Add power management support")
Signed-off-by: Felix Gu <ustc.gu@gmail.com>
---
drivers/spi/spi-mtk-nor.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/spi/spi-mtk-nor.c b/drivers/spi/spi-mtk-nor.c
index 63f5139176c8..6b6e55d68048 100644
--- a/drivers/spi/spi-mtk-nor.c
+++ b/drivers/spi/spi-mtk-nor.c
@@ -929,6 +929,7 @@ static int mtk_nor_probe(struct platform_device *pdev)
return 0;
err_probe:
+ pm_runtime_put_noidle(&pdev->dev);
pm_runtime_disable(&pdev->dev);
pm_runtime_set_suspended(&pdev->dev);
pm_runtime_dont_use_autosuspend(&pdev->dev);
---
base-commit: 9d80aa4617b32f5054c5aa471d06b66704854935
change-id: 20260904-mtk-nor-000ff9cb886f
Best regards,
--
Felix Gu <ustc.gu@gmail.com>
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH] spi: mtk-nor: fix runtime PM usage count leak in probe error path
2026-09-04 15:51 [PATCH] spi: mtk-nor: fix runtime PM usage count leak in probe error path Felix Gu
@ 2026-09-04 18:49 ` Mark Brown
0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2026-09-04 18:49 UTC (permalink / raw)
To: Matthias Brugger, AngeloGioacchino Del Regno, Ikjoon Jang,
Felix Gu
Cc: linux-spi, linux-kernel, linux-arm-kernel, linux-mediatek
On Fri, 04 Sep 2026 23:51:29 +0800, Felix Gu wrote:
> spi: mtk-nor: fix runtime PM usage count leak in probe error path
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git for-7.4
Thanks!
[1/1] spi: mtk-nor: fix runtime PM usage count leak in probe error path
https://git.kernel.org/broonie/spi/c/4cee1ed13e26
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-09-05 11:59 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-04 15:51 [PATCH] spi: mtk-nor: fix runtime PM usage count leak in probe error path Felix Gu
2026-09-04 18:49 ` Mark Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox