mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] remoteproc: qcom: q6v5: Release QMP handle on ICC path failure
@ 2026-06-23 13:20 Haoxiang Li
  2026-06-23 16:01 ` Mukesh Ojha
  0 siblings, 1 reply; 3+ messages in thread
From: Haoxiang Li @ 2026-06-23 13:20 UTC (permalink / raw)
  To: andersson, mathieu.poirier, djakov
  Cc: linux-arm-msm, linux-remoteproc, linux-kernel, Haoxiang Li

qcom_q6v5_init() acquires the QMP handle before getting the
interconnect path. If devm_of_icc_get() fails, the function
returns without releasing the QMP handle, leaking the device
reference acquired by qmp_get().

Release the QMP handle on the interconnect error path before returning.

Fixes: 8d9be5c6bdcd ("remoteproc: qcom: q6v5: Add interconnect path proxy vote")
Signed-off-by: Haoxiang Li <haoxiang_li2024@163.com>
---
 drivers/remoteproc/qcom_q6v5.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/remoteproc/qcom_q6v5.c b/drivers/remoteproc/qcom_q6v5.c
index 58d5b85e58cd..b57041a37d28 100644
--- a/drivers/remoteproc/qcom_q6v5.c
+++ b/drivers/remoteproc/qcom_q6v5.c
@@ -347,9 +347,11 @@ int qcom_q6v5_init(struct qcom_q6v5 *q6v5, struct platform_device *pdev,
 	}
 
 	q6v5->path = devm_of_icc_get(&pdev->dev, NULL);
-	if (IS_ERR(q6v5->path))
+	if (IS_ERR(q6v5->path)) {
+		qmp_put(q6v5->qmp);
 		return dev_err_probe(&pdev->dev, PTR_ERR(q6v5->path),
 				     "failed to acquire interconnect path\n");
+	}
 
 	return 0;
 }
-- 
2.25.1


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

end of thread, other threads:[~2026-06-23 16:11 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-06-23 13:20 [PATCH] remoteproc: qcom: q6v5: Release QMP handle on ICC path failure Haoxiang Li
2026-06-23 16:01 ` Mukesh Ojha
2026-06-23 16:11   ` Konrad Dybcio

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®