diff options
author | Peter Chen <peter.chen@nxp.com> | 2016-07-01 17:42:00 +0800 |
---|---|---|
committer | MyungJoo Ham <myungjoo.ham@samsung.com> | 2016-07-06 13:11:24 +0900 |
commit | 3427c6f0b6f5643543f9b6c55f80bee83c0d5ff3 (patch) | |
tree | 958f954cd3077f43a624141e6a9bb33f4b8c7cd8 /drivers/devfreq | |
parent | 99e65ae09a1c853fe36a89d9333fdcbff07de327 (diff) | |
download | op-kernel-dev-3427c6f0b6f5643543f9b6c55f80bee83c0d5ff3.zip op-kernel-dev-3427c6f0b6f5643543f9b6c55f80bee83c0d5ff3.tar.gz |
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.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/devfreq/devfreq.c b/drivers/devfreq/devfreq.c index 3cc558d..478006b 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); } |