Skip to contentSkip to conversation

PM / devfreq: rockchip-dfi: add missing of_node_put()

PATCH Applied Yangtao Li 2 participants 5 messages Dec 14, 2019 – Dec 15, 2019

Subsystems (3)
lore
Share & tools
lore

Yangtao Li

author
#0 lore raw

PATCH 1/2 PM / devfreq: rockchip-dfi: add missing of_node_put()

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

---
 drivers/devfreq/event/rockchip-dfi.c | 1 +
 1 file changed, 1 insertion(+)
drivers/devfreq/event/rockchip-dfi.c +1 -0
index 5d1042188727..45b190e443d8 100644
@@ -200,6 +200,7 @@ static int rockchip_dfi_probe(struct platform_device *pdev)
 	node = of_parse_phandle(np, "rockchip,pmu", 0);
 	if (node) {
 		data->regmap_pmu = syscon_node_to_regmap(node);
+		of_node_put(node);
 		if (IS_ERR(data->regmap_pmu))
 			return PTR_ERR(data->regmap_pmu);
 	}
Signature · 1 line
2.17.1
author
#1 lore raw

PATCH 2/2 PM / devfreq: rk3399_dmc: add missing of_node_put()

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

---
 drivers/devfreq/rk3399_dmc.c | 1 +
 1 file changed, 1 insertion(+)
drivers/devfreq/rk3399_dmc.c +1 -0
index 2e65d7279d79..2f1027c5b647 100644
@@ -372,6 +372,7 @@ static int rk3399_dmcfreq_probe(struct platform_device *pdev)
 	node = of_parse_phandle(np, "rockchip,pmu", 0);
 	if (node) {
 		data->regmap_pmu = syscon_node_to_regmap(node);
+		of_node_put(node);
 		if (IS_ERR(data->regmap_pmu))
 			return PTR_ERR(data->regmap_pmu);
 	}
Signature · 1 line
2.17.1
#2 lore raw

Re: [PATCH 2/2] PM / devfreq: rk3399_dmc: add missing of_node_put()

2019년 12월 15일 (일) 오전 3:12, Yangtao Li <[email protected]>님이 작성:

Quoted 22 lines

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

---
 drivers/devfreq/rk3399_dmc.c | 1 +
 1 file changed, 1 insertion(+)
drivers/devfreq/rk3399_dmc.c +1 -1
index 2e65d7279d79..2f1027c5b647 100644
@@ -372,6 +372,7 @@ static int rk3399_dmcfreq_probe(struct platform_device *pdev)
        node = of_parse_phandle(np, "rockchip,pmu", 0);
        if (node) {
                data->regmap_pmu = syscon_node_to_regmap(node);
+               of_node_put(node);
                if (IS_ERR(data->regmap_pmu))
                        return PTR_ERR(data->regmap_pmu);
        }
--
Quoted 2 lines

2.17.1

Applied it.

Signature · 2 lines
Best Regards,
Chanwoo Choi
Applied
#3 lore raw
In reply to Yangtao Li

2019년 12월 15일 (일) 오전 3:12, Yangtao Li <[email protected]>님이 작성:

Quoted 22 lines

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

---
 drivers/devfreq/event/rockchip-dfi.c | 1 +
 1 file changed, 1 insertion(+)
drivers/devfreq/event/rockchip-dfi.c +1 -1
index 5d1042188727..45b190e443d8 100644
@@ -200,6 +200,7 @@ static int rockchip_dfi_probe(struct platform_device *pdev)
        node = of_parse_phandle(np, "rockchip,pmu", 0);
        if (node) {
                data->regmap_pmu = syscon_node_to_regmap(node);
+               of_node_put(node);
                if (IS_ERR(data->regmap_pmu))
                        return PTR_ERR(data->regmap_pmu);
        }
--
Quoted 2 lines

2.17.1

Applied it. Better to use the capital letter for first char of sentence.

Signature · 2 lines
Best Regards,
Chanwoo Choi
author
#4 lore raw
Quoted 20 lines · Chanwoo Choi

2019년 12월 15일 (일) 오전 3:12, Yangtao Li <[email protected]>님이 작성:

Quoted 18 lines

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

---
 drivers/devfreq/event/rockchip-dfi.c | 1 +
 1 file changed, 1 insertion(+)
drivers/devfreq/event/rockchip-dfi.c +1 -0
index 5d1042188727..45b190e443d8 100644
@@ -200,6 +200,7 @@ static int rockchip_dfi_probe(struct platform_device *pdev)
        node = of_parse_phandle(np, "rockchip,pmu", 0);
        if (node) {
                data->regmap_pmu = syscon_node_to_regmap(node);
+               of_node_put(node);
Quoted 8 lines
Quoted 6 lines
drivers/devfreq/event/rockchip-dfi.c +0 -1
                if (IS_ERR(data->regmap_pmu))
                        return PTR_ERR(data->regmap_pmu);
        }
--

2.17.1

Applied it. Better to use the capital letter for first char of sentence.

Thx!

Yangtao

Quoted 4 lines

--
Best Regards,
Chanwoo Choi

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel