diff mbox

[08/15] power-supply: Propagate error returned by power_supply_find_supply_from_node()

Message ID 38723e6ec5cf70de46fe296fac40235b708a7151.1409831636.git.viresh.kumar@linaro.org
State Accepted
Commit f5b89affe2b2e6a6092f4228baf08a6dd59bfc61
Headers show

Commit Message

Viresh Kumar Sept. 4, 2014, 12:01 p.m. UTC
Callers of power_supply_find_supply_from_node(), i.e.
power_supply_check_supplies(), must propagate the errors returned by it instead
of returning their own.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
 drivers/power/power_supply_core.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff mbox

Patch

diff --git a/drivers/power/power_supply_core.c b/drivers/power/power_supply_core.c
index 8a86cd1..ab1cf8b 100644
--- a/drivers/power/power_supply_core.c
+++ b/drivers/power/power_supply_core.c
@@ -221,8 +221,8 @@  static int power_supply_check_supplies(struct power_supply *psy)
 		of_node_put(np);
 
 		if (ret) {
-			dev_dbg(psy->dev, "Failed to find supply, defer!\n");
-			return -EPROBE_DEFER;
+			dev_dbg(psy->dev, "Failed to find supply!\n");
+			return ret;
 		}
 	} while (np);