* [PATCH] remoteproc: qcom_wcnss: Clean up subdevices on probe failure
@ 2026-11-05 12:31 Anup Vishwakarma
2026-11-05 15:56 ` Konrad Dybcio
0 siblings, 1 reply; 2+ messages in thread
From: Anup Vishwakarma @ 2026-11-05 12:31 UTC (permalink / raw)
To: Bjorn Andersson, Mathieu Poirier
Cc: linux-arm-msm, linux-remoteproc, linux-kernel, Anup Vishwakarma
wcnss_probe() registers the SMD and sysmon subdevices before the iris
probe and rproc_add(), but the error paths after them only release the
power domains. A failure there, such as a deferred probe of the iris
clock or regulators, leaves the SMD subdevice registered with its
smd-edge node reference held, and leaves the sysmon instance on the
global sysmon list.
Unwind in reverse order of registration. The sysmon failure path skips
qcom_remove_sysmon_subdev(), as wcnss->sysmon is an error pointer there.
Fixes: 5a856bc63ce9 ("remoteproc: wcnss: Bond SMD edge to remoteproc")
Fixes: 1fb82ee806d1 ("remoteproc: qcom: Introduce sysmon")
Signed-off-by: Anup Vishwakarma <anup.vishwakarma@oss.qualcomm.com>
---
drivers/remoteproc/qcom_wcnss.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/drivers/remoteproc/qcom_wcnss.c b/drivers/remoteproc/qcom_wcnss.c
index c856a92af43c..f4847fb8f13b 100644
--- a/drivers/remoteproc/qcom_wcnss.c
+++ b/drivers/remoteproc/qcom_wcnss.c
@@ -653,13 +653,13 @@ static int wcnss_probe(struct platform_device *pdev)
wcnss->sysmon = qcom_add_sysmon_subdev(rproc, "wcnss", WCNSS_SSCTL_ID);
if (IS_ERR(wcnss->sysmon)) {
ret = PTR_ERR(wcnss->sysmon);
- goto detach_pds;
+ goto remove_smd_subdev;
}
wcnss->iris = qcom_iris_probe(&pdev->dev, &wcnss->use_48mhz_xo);
if (IS_ERR(wcnss->iris)) {
ret = PTR_ERR(wcnss->iris);
- goto detach_pds;
+ goto remove_sysmon_subdev;
}
ret = rproc_add(rproc);
@@ -670,6 +670,10 @@ static int wcnss_probe(struct platform_device *pdev)
remove_iris:
qcom_iris_remove(wcnss->iris);
+remove_sysmon_subdev:
+ qcom_remove_sysmon_subdev(wcnss->sysmon);
+remove_smd_subdev:
+ qcom_remove_smd_subdev(rproc, &wcnss->smd_subdev);
detach_pds:
wcnss_release_pds(wcnss);
---
base-commit: 8b7179210b22f8e48a82c5ceacb9d56a9c4cfec4
change-id: 20261105-b4-wcnss_unwind_send-dfd3abeeb82d
Best regards,
--
Anup Vishwakarma <anup.vishwakarma@oss.qualcomm.com>
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [PATCH] remoteproc: qcom_wcnss: Clean up subdevices on probe failure
2026-11-05 12:31 [PATCH] remoteproc: qcom_wcnss: Clean up subdevices on probe failure Anup Vishwakarma
@ 2026-11-05 15:56 ` Konrad Dybcio
0 siblings, 0 replies; 2+ messages in thread
From: Konrad Dybcio @ 2026-11-05 15:56 UTC (permalink / raw)
To: Anup Vishwakarma, Bjorn Andersson, Mathieu Poirier
Cc: linux-arm-msm, linux-remoteproc, linux-kernel
On 11/5/26 1:31 PM, Anup Vishwakarma wrote:
> wcnss_probe() registers the SMD and sysmon subdevices before the iris
> probe and rproc_add(), but the error paths after them only release the
> power domains. A failure there, such as a deferred probe of the iris
> clock or regulators, leaves the SMD subdevice registered with its
> smd-edge node reference held, and leaves the sysmon instance on the
> global sysmon list.
>
> Unwind in reverse order of registration. The sysmon failure path skips
> qcom_remove_sysmon_subdev(), as wcnss->sysmon is an error pointer there.
>
> Fixes: 5a856bc63ce9 ("remoteproc: wcnss: Bond SMD edge to remoteproc")
> Fixes: 1fb82ee806d1 ("remoteproc: qcom: Introduce sysmon")
> Signed-off-by: Anup Vishwakarma <anup.vishwakarma@oss.qualcomm.com>
> ---
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Konrad
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-11-05 15:56 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-05 12:31 [PATCH] remoteproc: qcom_wcnss: Clean up subdevices on probe failure Anup Vishwakarma
2026-11-05 15:56 ` 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®