diff options
| author | Felix Gu <ustc.gu@gmail.com> | 2026-09-04 23:51:29 +0800 |
|---|---|---|
| committer | Mark Brown <broonie@kernel.org> | 2026-09-04 19:49:04 +0100 |
| commit | 4cee1ed13e2687f1a9fec7dd50e31eb179506d75 (patch) | |
| tree | 4545ee5fc1615778e168a5d1c11cc17072ec71cc | |
| parent | 8992169e7ac6b216f881cb373bb2c6bff0c6162a (diff) | |
| download | linux-next-4cee1ed13e2687f1a9fec7dd50e31eb179506d75.tar.gz linux-next-4cee1ed13e2687f1a9fec7dd50e31eb179506d75.zip | |
spi: mtk-nor: fix runtime PM usage count leak in probe error path
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>
Link: https://patch.msgid.link/20260904-mtk-nor-v1-1-cefdca098f83@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
| -rw-r--r-- | drivers/spi/spi-mtk-nor.c | 1 |
1 files changed, 1 insertions, 0 deletions
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); |
