summaryrefslogtreecommitdiffstats
path: root/drivers/devfreq
diff options
context:
space:
mode:
authorPeter Chen <peter.chen@nxp.com>2016-07-01 11:42:00 +0200
committerMyungJoo Ham <myungjoo.ham@samsung.com>2016-07-06 06:11:24 +0200
commit3427c6f0b6f5643543f9b6c55f80bee83c0d5ff3 (patch)
tree958f954cd3077f43a624141e6a9bb33f4b8c7cd8 /drivers/devfreq
parentPM / devfreq: exynos-ppmu: fix error path in exynos_ppmu_probe() (diff)
downloadlinux-3427c6f0b6f5643543f9b6c55f80bee83c0d5ff3.tar.xz
linux-3427c6f0b6f5643543f9b6c55f80bee83c0d5ff3.zip
PM / devfreq: 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: MyungJoo Ham <myungjoo.ham@samsung.com> Cc: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Peter Chen <peter.chen@nxp.com> Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
Diffstat (limited to 'drivers/devfreq')
-rw-r--r--drivers/devfreq/devfreq.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/devfreq/devfreq.c b/drivers/devfreq/devfreq.c
index 3cc558df8295..478006b7764a 100644
--- a/drivers/devfreq/devfreq.c
+++ b/drivers/devfreq/devfreq.c
@@ -707,10 +707,12 @@ struct devfreq *devfreq_get_devfreq_by_phandle(struct device *dev, int index)
if (devfreq->dev.parent
&& devfreq->dev.parent->of_node == node) {
mutex_unlock(&devfreq_list_lock);
+ of_node_put(node);
return devfreq;
}
}
mutex_unlock(&devfreq_list_lock);
+ of_node_put(node);
return ERR_PTR(-EPROBE_DEFER);
}