Skip to contentSkip to conversation

pfuze100-regulator: Return error on of_node_get() failure

PATCH Applied Fabio Estevam 2 participants 2 messages Feb 20, 2014 – Feb 23, 2014 Voltage and current regulator framework

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 pfuze100-regulator: Return error on of_node_get() failure

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

---
 drivers/regulator/pfuze100-regulator.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/regulator/pfuze100-regulator.c +1 -1
index dcb03ce..1296221 100644
@@ -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
maintainer Applied
#1 lore raw
Quoted 1 line · Fabio Estevam

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

Applied, thanks.