mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-27 21:03:32 +00:00
regulator: of: Add a missing 'of_node_put()' in an error handling path of 'of_regulator_match()'
[ Upstream commit 30966861a7
]
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: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
9c4eb3b322
commit
4c9701fd43
1 changed files with 1 additions and 0 deletions
|
@ -282,6 +282,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);
|
||||
|
|
Loading…
Reference in a new issue