Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/stm: Fix runtime PM leak in ltdc_crtc_mode_set_nofb()
@ 2026-09-16 18:21 Wentao Liang
  0 siblings, 0 replies; only message in thread
From: Wentao Liang @ 2026-09-16 18:21 UTC (permalink / raw)
  To: airlied
  Cc: alexandre.torgue, benjamin.gaignard, dri-devel, linux-arm-kernel,
	linux-kernel, linux-stm32, maarten.lankhorst, mcoquelin.stm32,
	mripard, philippe.cornu, raphael.gallais-pou, simona, tzimmermann,
	yannick.fertre, yannick.fertre, Wentao Liang, stable

pm_runtime_get_sync() increments the usage counter even when it fails,
so the early return on a failed resume leaves the counter elevated
forever.  Drop it again with pm_runtime_put_noidle() on that path.

Fixes: 35ab6cfbf211 ("drm/stm: support runtime power management")
Cc: stable@vger.kernel.org
Signed-off-by: Wentao Liang <vulab@iscas.ac.cn>
---
 drivers/gpu/drm/stm/ltdc.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/gpu/drm/stm/ltdc.c b/drivers/gpu/drm/stm/ltdc.c
index f7e847cfa38f..a95ca3c3df76 100644
--- a/drivers/gpu/drm/stm/ltdc.c
+++ b/drivers/gpu/drm/stm/ltdc.c
@@ -945,6 +945,7 @@ static void ltdc_crtc_mode_set_nofb(struct drm_crtc *crtc)
 		ret = pm_runtime_get_sync(ddev->dev);
 		if (ret) {
 			drm_err(crtc->dev, "Failed to set mode, cannot get sync\n");
+			pm_runtime_put_noidle(ddev->dev);
 			return;
 		}
 	}
-- 
2.34.1



^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-09-16 18:22 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-16 18:21 [PATCH] drm/stm: Fix runtime PM leak in ltdc_crtc_mode_set_nofb() Wentao Liang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox