2014-02-20 16:47:23

by Fabio Estevam

[permalink] [raw]
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 <[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


2014-02-23 07:11:47

by Mark Brown

[permalink] [raw]
Subject: Re: [PATCH] pfuze100-regulator: Return error on of_node_get() failure

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.


Attachments:
(No filename) (134.00 B)
signature.asc (836.00 B)
Digital signature
Download all attachments