summaryrefslogtreecommitdiff
path: root/drivers/devfreq/exynos-bus.c
diff options
context:
space:
mode:
authorPeter Chen <peter.chen@nxp.com>2016-07-01 12:42:01 +0300
committerMyungJoo Ham <myungjoo.ham@samsung.com>2016-07-06 07:11:24 +0300
commitd8150d14e9bc44ba55c707cc67f4fa66d65cfdef (patch)
tree16277539128c21320d65093fbf3e5fc55657e4c6 /drivers/devfreq/exynos-bus.c
parent3427c6f0b6f5643543f9b6c55f80bee83c0d5ff3 (diff)
downloadlinux-d8150d14e9bc44ba55c707cc67f4fa66d65cfdef.tar.xz
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>
Diffstat (limited to 'drivers/devfreq/exynos-bus.c')
-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:
static int exynos_bus_probe(struct platform_device *pdev)
{
struct device *dev = &pdev->dev;
- struct device_node *np = dev->of_node;
+ struct device_node *np = dev->of_node, *node;
struct devfreq_dev_profile *profile;
struct devfreq_simple_ondemand_data *ondemand_data;
struct devfreq_passive_data *passive_data;
@@ -415,10 +415,13 @@ static int exynos_bus_probe(struct platform_device *pdev)
goto err;
}
- if (of_parse_phandle(dev->of_node, "devfreq", 0))
+ node = of_parse_phandle(dev->of_node, "devfreq", 0);
+ if (node) {
+ of_node_put(node);
goto passive;
- else
+ } else {
ret = exynos_bus_parent_parse_of(np, bus);
+ }
if (ret < 0)
goto err;