summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAmitai Gottlieb <amitaig@hailo.ai>2025-12-16 14:50:09 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2026-01-11 17:22:33 +0300
commit0e8ac70521e679fd0e1eca86a536aa797db38b15 (patch)
tree7f5cae37536d8e4428e711ee702327e8aafd75c9
parent21e82354cdd7c954dbcf3e06d8536b40d2813c16 (diff)
downloadlinux-0e8ac70521e679fd0e1eca86a536aa797db38b15.tar.xz
firmware: arm_scmi: Fix unused notifier-block in unregister
In scmi_devm_notifier_unregister(), the notifier-block argument was ignored and never passed to devres_release(). As a result, the function always returned -ENOENT and failed to unregister the notifier. Drivers that depend on this helper for teardown could therefore hit unexpected failures, including kernel panics. Commit 264a2c520628 ("firmware: arm_scmi: Simplify scmi_devm_notifier_unregister") removed the faulty code path during refactoring and hence this fix is not required upstream. Cc: <stable@vger.kernel.org> # 5.15.x, 6.1.x, and 6.6.x Fixes: 5ad3d1cf7d34 ("firmware: arm_scmi: Introduce new devres notification ops") Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org> Reviewed-by: Cristian Marussi <cristian.marussi@arm.com> Signed-off-by: Amitai Gottlieb <amitaig@hailo.ai> Reviewed-by: Sudeep Holla <sudeep.holla@arm.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/firmware/arm_scmi/notify.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/firmware/arm_scmi/notify.c b/drivers/firmware/arm_scmi/notify.c
index 0efd20cd9d69..4782b115e6ec 100644
--- a/drivers/firmware/arm_scmi/notify.c
+++ b/drivers/firmware/arm_scmi/notify.c
@@ -1539,6 +1539,7 @@ static int scmi_devm_notifier_unregister(struct scmi_device *sdev,
dres.handle = sdev->handle;
dres.proto_id = proto_id;
dres.evt_id = evt_id;
+ dres.nb = nb;
if (src_id) {
dres.__src_id = *src_id;
dres.src_id = &dres.__src_id;