aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeter Chen <peter.chen@nxp.com>2016-07-01 05:42:01 -0400
committerMyungJoo Ham <myungjoo.ham@samsung.com>2016-07-06 00:11:24 -0400
commitd8150d14e9bc44ba55c707cc67f4fa66d65cfdef (patch)
tree16277539128c21320d65093fbf3e5fc55657e4c6
parent3427c6f0b6f5643543f9b6c55f80bee83c0d5ff3 (diff)
PM / devfreq: exynos-bus: 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. [Commit updated to fix an error by MyungJoo] Cc: Chanwoo Choi <cw00.choi@samsung.com> Cc: MyungJoo Ham <myungjoo.ham@samsung.com> Cc: Kyungmin Park <kyungmin.park@samsung.com> Cc: Kukjin Kim <kgene@kernel.org> Cc: Krzysztof Kozlowski <k.kozlowski@samsung.com> Signed-off-by: Peter Chen <peter.chen@nxp.com> Acked-by: Chanwoo Choi <cw00.choi@samsung.com> Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
-rw-r--r--drivers/devfreq/exynos-bus.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/devfreq/exynos-bus.c b/drivers/devfreq/exynos-bus.c
index e946f8f289cb..29866f7e6d7e 100644
--- a/drivers/devfreq/exynos-bus.c
+++ b/drivers/devfreq/exynos-bus.c
@@ -383,7 +383,7 @@ err_clk:
383static int exynos_bus_probe(struct platform_device *pdev) 383static int exynos_bus_probe(struct platform_device *pdev)
384{ 384{
385 struct device *dev = &pdev->dev; 385 struct device *dev = &pdev->dev;
386 struct device_node *np = dev->of_node; 386 struct device_node *np = dev->of_node, *node;
387 struct devfreq_dev_profile *profile; 387 struct devfreq_dev_profile *profile;
388 struct devfreq_simple_ondemand_data *ondemand_data; 388 struct devfreq_simple_ondemand_data *ondemand_data;
389 struct devfreq_passive_data *passive_data; 389 struct devfreq_passive_data *passive_data;
@@ -415,10 +415,13 @@ static int exynos_bus_probe(struct platform_device *pdev)
415 goto err; 415 goto err;
416 } 416 }
417 417
418 if (of_parse_phandle(dev->of_node, "devfreq", 0)) 418 node = of_parse_phandle(dev->of_node, "devfreq", 0);
419 if (node) {
420 of_node_put(node);
419 goto passive; 421 goto passive;
420 else 422 } else {
421 ret = exynos_bus_parent_parse_of(np, bus); 423 ret = exynos_bus_parent_parse_of(np, bus);
424 }
422 425
423 if (ret < 0) 426 if (ret < 0)
424 goto err; 427 goto err;