Explorar o código

pfuze100-regulator: Return error on of_node_get() failure

If of_node_get() fails, we should return an error.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
Fabio Estevam %!s(int64=11) %!d(string=hai) anos
pai
achega
6428789e11
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      drivers/regulator/pfuze100-regulator.c

+ 1 - 1
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) {