未验证 提交 30966861 编写于 作者: C Christophe JAILLET 提交者: Mark Brown

regulator: of: Add a missing 'of_node_put()' in an error handling path of 'of_regulator_match()'

If an unlikely failure in 'of_get_regulator_init_data()' occurs, we must
release the reference on the current 'child' node before returning.
Signed-off-by: NChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: NMark Brown <broonie@kernel.org>
上级 7928b2cb
......@@ -321,6 +321,7 @@ int of_regulator_match(struct device *dev, struct device_node *node,
dev_err(dev,
"failed to parse DT for regulator %s\n",
child->name);
of_node_put(child);
return -EINVAL;
}
match->of_node = of_node_get(child);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册