Skip to contentSkip to conversation

mfd: qcom_rpm: add missing of_node_put after calling of_parse_phandle

PATCH Applied Peter Chen 3 participants 3 messages Jul 15, 2016 – Aug 8, 2016

Subsystems (2)
lore
Share & tools
lore

Peter Chen

author
#0 lore raw

PATCH 1/1 mfd: qcom_rpm: add missing of_node_put after calling of_parse_phandle

of_node_put needs to be called when the device node which is got from of_parse_phandle has finished using.

Cc Bjorn Andersson <[email protected]>
Cc Lee Jones <[email protected]>
---
 drivers/mfd/qcom_rpm.c | 1 +
 1 file changed, 1 insertion(+)
drivers/mfd/qcom_rpm.c +1 -0
index 2e44323..ecca115 100644
@@ -538,6 +538,7 @@ static int qcom_rpm_probe(struct platform_device *pdev)
 	}
 
 	rpm->ipc_regmap = syscon_node_to_regmap(syscon_np);
+	of_node_put(syscon_np);
 	if (IS_ERR(rpm->ipc_regmap))
 		return PTR_ERR(rpm->ipc_regmap);
 
Signature · 1 line
1.9.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 4 lines · Peter Chen

of_node_put needs to be called when the device node which is got from of_parse_phandle has finished using.

Cc Bjorn Andersson <[email protected]>

Regards,
Bjorn

Quoted 21 lines
---
 drivers/mfd/qcom_rpm.c | 1 +
 1 file changed, 1 insertion(+)
drivers/mfd/qcom_rpm.c +1 -0
index 2e44323..ecca115 100644
@@ -538,6 +538,7 @@ static int qcom_rpm_probe(struct platform_device *pdev)
 	}
 
 	rpm->ipc_regmap = syscon_node_to_regmap(syscon_np);
+	of_node_put(syscon_np);
 	if (IS_ERR(rpm->ipc_regmap))
 		return PTR_ERR(rpm->ipc_regmap);
 
Signature · 1 line
1.9.1
Applied
#2 lore raw
In reply to Peter Chen
Quoted 9 lines · Peter Chen

of_node_put needs to be called when the device node which is got from of_parse_phandle has finished using.

Cc Bjorn Andersson <[email protected]>
Cc Lee Jones <[email protected]>
---
 drivers/mfd/qcom_rpm.c | 1 +
 1 file changed, 1 insertion(+)

Applied, thanks.

Quoted 12 lines
drivers/mfd/qcom_rpm.c +1 -0
index 2e44323..ecca115 100644
@@ -538,6 +538,7 @@ static int qcom_rpm_probe(struct platform_device *pdev)
 	}
 
 	rpm->ipc_regmap = syscon_node_to_regmap(syscon_np);
+	of_node_put(syscon_np);
 	if (IS_ERR(rpm->ipc_regmap))
 		return PTR_ERR(rpm->ipc_regmap);
 
Signature · 4 lines
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog