From: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
To: Mukesh Ojha <mukesh.ojha@oss.qualcomm.com>,
Haoxiang Li <haoxiang_li2024@163.com>
Cc: andersson@kernel.org, mathieu.poirier@linaro.org,
djakov@kernel.org, linux-arm-msm@vger.kernel.org,
linux-remoteproc@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] remoteproc: qcom: q6v5: Release QMP handle on ICC path failure
Date: Tue, 23 Jun 2026 18:11:32 +0200 [thread overview]
Message-ID: <cad79064-5462-421a-b477-42c3d9729db4@oss.qualcomm.com> (raw)
In-Reply-To: <20260623160132.5rknnudcs7g7haoi@hu-mojha-hyd.qualcomm.com>
On 6/23/26 6:01 PM, Mukesh Ojha wrote:
> On Tue, Jun 23, 2026 at 09:20:15PM +0800, Haoxiang Li wrote:
>> 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");
>> + }
>
> I would have preferred to move devm_of_icc_get before qmp_get()
Yeah this saves on cleanup
Konrad
prev parent reply other threads:[~2026-06-23 16:11 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-23 13:20 Haoxiang Li
2026-06-23 16:01 ` Mukesh Ojha
2026-06-23 16:11 ` Konrad Dybcio [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=cad79064-5462-421a-b477-42c3d9729db4@oss.qualcomm.com \
--to=konrad.dybcio@oss.qualcomm.com \
--cc=andersson@kernel.org \
--cc=djakov@kernel.org \
--cc=haoxiang_li2024@163.com \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-remoteproc@vger.kernel.org \
--cc=mathieu.poirier@linaro.org \
--cc=mukesh.ojha@oss.qualcomm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®