Thread (2 messages) 2 messages, 2 authors, 5h ago

[PATCH] reset: scmi: Set the device for the reset controller

HOTtoday

From: Kunihiko Hayashi <hayashi.kunihiko@socionext.com>
Date: 2026-10-02 08:41:49
Also in: arm-scmi, lkml
Subsystem: reset controller framework, system control & power/management interface (scpi/scmi) message protocol drivers, the rest · Maintainers: Philipp Zabel, Sudeep Holla, Linus Torvalds

SCMI reset driver does not set rcdev.dev when registering its reset
controller.

If rcdev.of_node is not available, the reset core tries to obtain
the firmware node from rcdev.dev. However, rcdev.dev is also NULL,
causing a NULL pointer dereference.

Set rcdev.dev to the SCMI device.

Signed-off-by: Kunihiko Hayashi <hayashi.kunihiko@socionext.com>
---
 drivers/reset/reset-scmi.c | 1 +
 1 file changed, 1 insertion(+)
diff --git a/drivers/reset/reset-scmi.c b/drivers/reset/reset-scmi.c
index 8be5743cc8fd..1523245f83ef 100644
--- a/drivers/reset/reset-scmi.c
+++ b/drivers/reset/reset-scmi.c
@@ -107,6 +107,7 @@ static int scmi_reset_probe(struct scmi_device *sdev)
 
 	data->rcdev.ops = &scmi_reset_ops;
 	data->rcdev.owner = THIS_MODULE;
+	data->rcdev.dev = dev;
 	data->rcdev.of_node = np;
 	data->rcdev.nr_resets = reset_ops->num_domains_get(ph);
 	data->ph = ph;
-- 
2.34.1

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help