Skip to contentSkip to conversation

bus/ti-sysc: Fix refcount leak bug

PATCH New Liang He 1 participant 1 message Jun 20, 2022 OMAP2+ support

lore
Share & tools
lore

Liang He

author
#0 lore raw

PATCH 1/1 bus/ti-sysc: Fix refcount leak bug

In sysc_init_static_data(), we need a of_node_put() to keep refcount balance for the of_find_node_by_path().

---
 drivers/bus/ti-sysc.c | 1 +
 1 file changed, 1 insertion(+)
drivers/bus/ti-sysc.c +1 -0
index 9a7d12332fad..d0400fde6637 100644
@@ -3138,6 +3138,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;
Signature · 1 line
2.25.1