提交 3427c6f0 编写于 作者: P Peter Chen 提交者: MyungJoo Ham

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: NPeter Chen <peter.chen@nxp.com>
Signed-off-by: NMyungJoo Ham <myungjoo.ham@samsung.com>
上级 99e65ae0
...@@ -707,10 +707,12 @@ struct devfreq *devfreq_get_devfreq_by_phandle(struct device *dev, int index) ...@@ -707,10 +707,12 @@ struct devfreq *devfreq_get_devfreq_by_phandle(struct device *dev, int index)
if (devfreq->dev.parent if (devfreq->dev.parent
&& devfreq->dev.parent->of_node == node) { && devfreq->dev.parent->of_node == node) {
mutex_unlock(&devfreq_list_lock); mutex_unlock(&devfreq_list_lock);
of_node_put(node);
return devfreq; return devfreq;
} }
} }
mutex_unlock(&devfreq_list_lock); mutex_unlock(&devfreq_list_lock);
of_node_put(node);
return ERR_PTR(-EPROBE_DEFER); return ERR_PTR(-EPROBE_DEFER);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册