summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorPeter Chen <peter.chen@nxp.com>2016-07-01 12:42:00 +0300
committerMyungJoo Ham <myungjoo.ham@samsung.com>2016-07-06 07:11:24 +0300
commit3427c6f0b6f5643543f9b6c55f80bee83c0d5ff3 (patch)
tree958f954cd3077f43a624141e6a9bb33f4b8c7cd8 /drivers
parent99e65ae09a1c853fe36a89d9333fdcbff07de327 (diff)
downloadlinux-3427c6f0b6f5643543f9b6c55f80bee83c0d5ff3.tar.xz
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')
-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);
}