[PATCH] bus: ti-sysc: Put the OCP node after checking compatibility
From: Zhu Jun
Date: Thu Nov 12 2026 - 02:26:07 EST
sysc_init_static_data() looks up the /ocp node to warn about an old
device tree, but does not release the lookup reference. The node is
not retained in the driver state.
Put the node after the compatibility check.
Fixes: 5f7259a578e9 ("bus: ti-sysc: Check for old incomplete dtb")
Signed-off-by: Zhu Jun <zhujun2@xxxxxxxxxxxxxxxxxxxx>
---
drivers/bus/ti-sysc.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/bus/ti-sysc.c b/drivers/bus/ti-sysc.c
index 12285ad9ef51..b3740f36173b 100644
--- a/drivers/bus/ti-sysc.c
+++ b/drivers/bus/ti-sysc.c
@@ -3015,6 +3015,7 @@ static int sysc_init_static_data(struct sysc *ddata)
np = of_find_node_by_path("/ocp");
WARN_ONCE(np && of_device_is_compatible(np, "simple-bus"),
"ti-sysc: Incomplete old dtb, please update\n");
+ of_node_put(np);
break;
default:
break;
--
2.51.0