mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] slimbus: ngd: Fix runtime PM leak in qcom_slim_ngd_xfer_msg_sync()
@ 2026-09-17 15:25 Wentao Liang
  2026-09-18  6:32 ` Srinivas Kandagatla
  0 siblings, 1 reply; 2+ messages in thread
From: Wentao Liang @ 2026-09-17 15:25 UTC (permalink / raw)
  To: gregkh
  Cc: linux-arm-msm, linux-kernel, linux-sound, srini, vkoul,
	Wentao Liang, stable

The successful transfer path returns 0 without dropping the runtime PM
usage counter taken by pm_runtime_get_sync().  The error paths all jump
to pm_put, which releases the reference, but a completed transfer keeps
it forever.

Fall through to pm_put on success so the reference is always released.

Fixes: 917809e2280bb ("slimbus: ngd: Add qcom SLIMBus NGD driver")
Cc: stable@vger.kernel.org
Signed-off-by: Wentao Liang <vulab@iscas.ac.cn>
---
 drivers/slimbus/qcom-ngd-ctrl.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/slimbus/qcom-ngd-ctrl.c b/drivers/slimbus/qcom-ngd-ctrl.c
index 1ed6be6e85d2..be5640f45d7c 100644
--- a/drivers/slimbus/qcom-ngd-ctrl.c
+++ b/drivers/slimbus/qcom-ngd-ctrl.c
@@ -937,7 +937,6 @@ static int qcom_slim_ngd_xfer_msg_sync(struct slim_controller *ctrl,
 		ret = -ETIMEDOUT;
 		goto pm_put;
 	}
-	return 0;
 
 pm_put:
 	pm_runtime_put(ctrl->dev);
-- 
2.34.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-09-18  6:32 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-17 15:25 [PATCH] slimbus: ngd: Fix runtime PM leak in qcom_slim_ngd_xfer_msg_sync() Wentao Liang
2026-09-18  6:32 ` Srinivas Kandagatla

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

all inboxes | Powered by JetHome®