mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] reset: scmi: Set the device for the reset controller
@ 2026-10-02  8:41 Kunihiko Hayashi
  2026-10-02  8:52 ` Sudeep Holla
  0 siblings, 1 reply; 2+ messages in thread
From: Kunihiko Hayashi @ 2026-10-02  8:41 UTC (permalink / raw)
  To: Sudeep Holla, Cristian Marussi, Philipp Zabel
  Cc: arm-scmi, linux-arm-kernel, linux-kernel, Kunihiko Hayashi

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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-10-02  8:52 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-02  8:41 [PATCH] reset: scmi: Set the device for the reset controller Kunihiko Hayashi
2026-10-02  8:52 ` Sudeep Holla

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®