From: Peter Chen Date: Fri, 1 Jul 2016 09:42:00 +0000 (+0800) Subject: PM / devfreq: add missing of_node_put after calling of_parse_phandle X-Git-Tag: v4.8-rc1~158^2~6^2^2~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3427c6f0b6f5643543f9b6c55f80bee83c0d5ff3;p=platform%2Fkernel%2Flinux-exynos.git 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 Cc: Kyungmin Park Signed-off-by: Peter Chen Signed-off-by: MyungJoo Ham --- 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); }