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(-)
diff --git a/drivers/regulator/pfuze100-regulator.c b/drivers/regulator/pfuze100-regulator.c
index dcb03ce..1296221 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) {
--
1.8.1.2
On Thu, Feb 20, 2014 at 01:47:02PM -0300, Fabio Estevam wrote:
> If of_node_get() fails, we should return an error.
Applied, thanks.