pfuze100-regulator: Return error on of_node_get() failure
PATCH 1/1 pfuze100-regulator: Return error on of_node_get() failure
If of_node_get() fails, we should return an error.
Signed-off-by Fabio Estevam <[email protected]>
--- drivers/regulator/pfuze100-regulator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/regulator/pfuze100-regulator.c +1 -1
@@ -252,7 +252,7 @@ static int pfuze_parse_regulators_dt(struct pfuze_chip *chip) np =of_node_get (dev->of_node);if (!np) -return 0 ; +return -EINVAL ; parent =of_get_child_by_name (np,"regulators" );if (!parent) {
Signature · 1 line
1.8.1.2
Quoted 1 line · Fabio Estevam
If
of_node_get()fails, we should return an error.
Applied, thanks.