提交 4eafec83 编写于 作者: J Javier Martinez Canillas 提交者: Mark Brown

regulator: of: Decrement refcount for suspend state nodes

of_get_regulation_constraints() calls of_get_child_by_name() to find the
regulator-state-{mem,disk} child nodes for each regulator. This function
increments the device node reference counter but this is not decremented
once the function is done using the node.

Fix that by calling of_node_put() after finishing using the device node.
Signed-off-by: NJavier Martinez Canillas <javier.martinez@collabora.co.uk>
Signed-off-by: NMark Brown <broonie@kernel.org>
上级 291d761c
......@@ -107,6 +107,7 @@ static void of_get_regulation_constraints(struct device_node *np,
"regulator-off-in-suspend"))
suspend_state->disabled = true;
of_node_put(suspend_np);
suspend_state = NULL;
suspend_np = NULL;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册