Skip to content

Commit 0a986fd

Browse files
amitaig-hailoopsiff
authored andcommitted
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 264a2c5 ("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: 5ad3d1c ("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> (cherry picked from commit 0e8ac70521e679fd0e1eca86a536aa797db38b15) Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
1 parent 736a28c commit 0a986fd

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

drivers/firmware/arm_scmi/notify.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1539,6 +1539,7 @@ static int scmi_devm_notifier_unregister(struct scmi_device *sdev,
15391539
dres.handle = sdev->handle;
15401540
dres.proto_id = proto_id;
15411541
dres.evt_id = evt_id;
1542+
dres.nb = nb;
15421543
if (src_id) {
15431544
dres.__src_id = *src_id;
15441545
dres.src_id = &dres.__src_id;

0 commit comments

Comments
 (0)