Skip to contentSkip to conversation

clk: qcom: Do not drop device node twice

PATCH Applied Guenter Roeck 2 participants 2 messages Feb 11, 2017 – Feb 14, 2017

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 clk: qcom: Do not drop device node twice

of_find_node_by_name() drops the reference to a passed device node. It is not necessary to drop it again, and doing so may result in the device node being released prematurely.

---
 drivers/clk/qcom/common.c | 1 -
 1 file changed, 1 deletion(-)
drivers/clk/qcom/common.c +0 -1
index cfab7b400381..03f9d316f969 100644
@@ -145,7 +145,6 @@ static int _qcom_cc_register_board_clk(struct device *dev, const char *path,
 	clocks_node = of_find_node_by_path("/clocks");
 	if (clocks_node)
 		node = of_find_node_by_name(clocks_node, path);
-	of_node_put(clocks_node);
 
 	if (!node) {
 		fixed = devm_kzalloc(dev, sizeof(*fixed), GFP_KERNEL);
Signature · 1 line
2.7.4
Applied
#1 lore raw
Quoted 7 lines · Guenter Roeck

of_find_node_by_name() drops the reference to a passed device node. It is not necessary to drop it again, and doing so may result in the device node being released prematurely.

---

Applied to clk-next

Signature · 2 lines
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project