aboutsummaryrefslogtreecommitdiff
path: root/drivers/devfreq/exynos-bus.c
diff options
context:
space:
mode:
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>2016-07-25 13:45:11 +0200
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2016-07-25 13:45:11 +0200
commitdbac75468eef385dc8d4bf9927a7547a17edb416 (patch)
tree5a15630edf5a0b9c0a6514c236e52bab861d550a /drivers/devfreq/exynos-bus.c
parent7f234a4d8aab23e778933808a88bfa47ea4fdc2a (diff)
parent454cbc446fa378ddab3052e0d01aeb4ceb8304e2 (diff)
Merge branch 'pm-devfreq'
* pm-devfreq: PM / devfreq: exynos-bus: add missing of_node_put after calling of_parse_phandle PM / devfreq: add missing of_node_put after calling of_parse_phandle PM / devfreq: exynos-ppmu: fix error path in exynos_ppmu_probe() PM / devfreq: exynos: fix error path in exynos_bus_probe() PM / devfreq: make event/exynos-ppmu DEVFREQ_EVENT_EXYNOS_PPMU tristate PM / devfreq: make event/exynos-nocp DEVFREQ_EVENT_EXYNOS_NOCP tristate PM / devfreq: make exynos-bus ARM_EXYNOS_BUS_DEVFREQ tristate PM / devfreq: make devfreq-event explicitly non-modular PM / devfreq: make devfreq explicitly non-modular
Diffstat (limited to 'drivers/devfreq/exynos-bus.c')
-rw-r--r--drivers/devfreq/exynos-bus.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/drivers/devfreq/exynos-bus.c b/drivers/devfreq/exynos-bus.c
index 2363d0a189b7..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;
@@ -407,7 +407,7 @@ static int exynos_bus_probe(struct platform_device *pdev)
/* Parse the device-tree to get the resource information */
ret = exynos_bus_parse_of(np, bus);
if (ret < 0)
- goto err;
+ return ret;
profile = devm_kzalloc(dev, sizeof(*profile), GFP_KERNEL);
if (!profile) {
@@ -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;