Skip to contentSkip to conversation

bus/arm-cci: Fix refcount leak in cci_probe

PATCH New Ma Ke 1 participant 1 message Oct 7, 2023

lore
Share & tools
lore

Ma Ke

author
#0 lore raw

PATCH 1/1 bus/arm-cci: Fix refcount leak in cci_probe

Add the missing of_node_put() to release the refcount incremented by of_find_matching_node().

---
 drivers/bus/arm-cci.c | 1 +
 1 file changed, 1 insertion(+)
drivers/bus/arm-cci.c +1 -0
index b8184a903583..6be7b05b5ff1 100644
@@ -548,6 +548,7 @@ static int cci_probe(void)
 	}
 	if (ret || !cci_ctrl_base) {
 		WARN(1, "unable to ioremap CCI ctrl\n");
+		of_node_put(np);
 		return -ENXIO;
 	}
 
Signature · 1 line
2.37.2