From 6428789e11f056d58ed59c0c0aa7d381d0bf50f8 Mon Sep 17 00:00:00 2001 From: Fabio Estevam Date: Thu, 20 Feb 2014 13:47:02 -0300 Subject: [PATCH] pfuze100-regulator: Return error on of_node_get() failure If of_node_get() fails, we should return an error. Signed-off-by: Fabio Estevam Signed-off-by: Mark Brown --- drivers/regulator/pfuze100-regulator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/regulator/pfuze100-regulator.c b/drivers/regulator/pfuze100-regulator.c index 9bd8b68f3d98..371a55374edc 100644 --- a/drivers/regulator/pfuze100-regulator.c +++ b/drivers/regulator/pfuze100-regulator.c @@ -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) { -- 2.34.1