From: srini@kernel.org
To: gregkh@linuxfoundation.org
Cc: linux-kernel@vger.kernel.org,
Bjorn Andersson <bjorn.andersson@oss.qualcomm.com>,
stable@vger.kernel.org,
Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>,
Mukesh Ojha <mukesh.ojha@oss.qualcomm.com>,
Srinivas Kandagatla <srini@kernel.org>
Subject: [PATCH 4/8] slimbus: qcom-ngd-ctrl: Correct PDR and SSR cleanup ownership
Date: Sat, 30 May 2026 21:44:17 +0100 [thread overview]
Message-ID: <20260530204421.116824-5-srini@kernel.org> (raw)
In-Reply-To: <20260530204421.116824-1-srini@kernel.org>
From: Bjorn Andersson <bjorn.andersson@oss.qualcomm.com>
PDR and SSR callbacks are registred from the controller probe function,
but currently released from the child device's remove function.
The remove() function should only be unwinding what was done in the
same device's probe() function.
Fixes: 917809e2280b ("slimbus: ngd: Add qcom SLIMBus NGD driver")
Cc: stable@vger.kernel.org
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Reviewed-by: Mukesh Ojha <mukesh.ojha@oss.qualcomm.com>
Signed-off-by: Bjorn Andersson <bjorn.andersson@oss.qualcomm.com>
Signed-off-by: Srinivas Kandagatla <srini@kernel.org>
---
drivers/slimbus/qcom-ngd-ctrl.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/slimbus/qcom-ngd-ctrl.c b/drivers/slimbus/qcom-ngd-ctrl.c
index 6b91a6f11cb6..e9238927cd2a 100644
--- a/drivers/slimbus/qcom-ngd-ctrl.c
+++ b/drivers/slimbus/qcom-ngd-ctrl.c
@@ -1683,6 +1683,9 @@ static void qcom_slim_ngd_ctrl_remove(struct platform_device *pdev)
{
struct qcom_slim_ngd_ctrl *ctrl = platform_get_drvdata(pdev);
+ pdr_handle_release(ctrl->pdr);
+ qcom_unregister_ssr_notifier(ctrl->notifier, &ctrl->nb);
+
qcom_slim_ngd_unregister(ctrl);
}
@@ -1691,8 +1694,6 @@ static void qcom_slim_ngd_remove(struct platform_device *pdev)
struct qcom_slim_ngd_ctrl *ctrl = platform_get_drvdata(pdev);
pm_runtime_disable(&pdev->dev);
- pdr_handle_release(ctrl->pdr);
- qcom_unregister_ssr_notifier(ctrl->notifier, &ctrl->nb);
qcom_slim_ngd_enable(ctrl, false);
qcom_slim_ngd_exit_dma(ctrl);
qcom_slim_ngd_qmi_svc_event_deinit(&ctrl->qmi);
--
2.53.0
next prev parent reply other threads:[~2026-05-30 20:44 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-30 20:44 [PATCH 0/8] slimbus: fixes for 7.1 srini
2026-05-30 20:44 ` [PATCH 1/8] slimbus: qcom-ngd-ctrl: fix OF node refcount srini
2026-05-30 20:44 ` [PATCH 2/8] slimbus: qcom-ngd-ctrl: Fix up platform_driver registration srini
2026-05-30 20:44 ` [PATCH 3/8] slimbus: qcom-ngd-ctrl: Fix probe error path ordering srini
2026-05-30 20:44 ` srini [this message]
2026-05-30 20:44 ` [PATCH 5/8] slimbus: qcom-ngd-ctrl: Register callbacks after creating the ngd srini
2026-05-30 20:44 ` [PATCH 6/8] slimbus: qcom-ngd-ctrl: Initialize controller resources in controller srini
2026-05-30 20:44 ` [PATCH 7/8] slimbus: qcom-ngd-ctrl: Balance pm_runtime enablement for NGD srini
2026-05-30 20:44 ` [PATCH 8/8] slimbus: qcom-ngd-ctrl: Avoid ABBA on tx_lock/ctrl->lock srini
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=20260530204421.116824-5-srini@kernel.org \
--to=srini@kernel.org \
--cc=bjorn.andersson@oss.qualcomm.com \
--cc=dmitry.baryshkov@oss.qualcomm.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mukesh.ojha@oss.qualcomm.com \
--cc=stable@vger.kernel.org \
/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®