projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7928b2c
)
regulator: of: Add a missing 'of_node_put()' in an error handling path of 'of_regulat...
author
Christophe JAILLET
<christophe.jaillet@wanadoo.fr>
Fri, 26 Jan 2018 22:13:44 +0000
(23:13 +0100)
committer
Mark Brown
<broonie@kernel.org>
Mon, 12 Feb 2018 12:05:31 +0000
(12:05 +0000)
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>
drivers/regulator/of_regulator.c
patch
|
blob
|
history
diff --git
a/drivers/regulator/of_regulator.c
b/drivers/regulator/of_regulator.c
index 092ed6efb3ec91a1ee9f45445d6a2f6e1076aa13..f47264fa1940ccf5bde15ffbc42723456ddfc96c 100644
(file)
--- a/
drivers/regulator/of_regulator.c
+++ b/
drivers/regulator/of_regulator.c
@@
-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);