public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
* [PATCH] firmware: arm_scpi: Fix a reference leak on device node
@ 2026-01-16 12:54 Felix Gu
  2026-01-16 13:36 ` Markus Elfring
  2026-01-18 19:15 ` [PATCH] " Dan Carpenter
  0 siblings, 2 replies; 8+ messages in thread
From: Felix Gu @ 2026-01-16 12:54 UTC (permalink / raw)
  To: Sudeep Holla, Cristian Marussi
  Cc: arm-scmi, linux-arm-kernel, linux-kernel, Felix Gu

When calling of_parse_phandle_with_args(), the caller is responsible
to call of_node_put() to release the reference of device node.
In scpi_dev_domain_id, it does not release the reference.

Fixes: 45ca7df7c345 ("firmware: arm_scpi: add support to populate OPPs and get transition latency")

Signed-off-by: Felix Gu <gu_0233@qq.com>
---
 drivers/firmware/arm_scpi.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/firmware/arm_scpi.c b/drivers/firmware/arm_scpi.c
index 87c323de17b9..b6233f81ef3e 100644
--- a/drivers/firmware/arm_scpi.c
+++ b/drivers/firmware/arm_scpi.c
@@ -665,6 +665,7 @@ static int scpi_dev_domain_id(struct device *dev)
 				       0, &clkspec))
 		return -EINVAL;
 
+	of_node_put(clkspec.np);
 	return clkspec.args[0];
 }
 

---
base-commit: 9b7977f9e39b7768c70c2aa497f04e7569fd3e00
change-id: 20260116-arm_scpi-0132a9eee0c2

Best regards,
-- 
Felix Gu <gu_0233@qq.com>



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

end of thread, other threads:[~2026-01-19 17:56 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-16 12:54 [PATCH] firmware: arm_scpi: Fix a reference leak on device node Felix Gu
2026-01-16 13:36 ` Markus Elfring
2026-01-16 15:33   ` Sudeep Holla
2026-01-16 16:13     ` Markus Elfring
2026-01-18 12:58       ` Dan Carpenter
2026-01-18 19:15 ` [PATCH] " Dan Carpenter
2026-01-19 15:25   ` Sudeep Holla
2026-01-19 17:55   ` Felix Gu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox