power-supply: Propagate error returned by power_supply_find_supply_from_node()
authorViresh Kumar <viresh.kumar@linaro.org>
Thu, 4 Sep 2014 12:01:29 +0000 (17:31 +0530)
committerSebastian Reichel <sre@kernel.org>
Tue, 16 Sep 2014 09:01:32 +0000 (11:01 +0200)
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>
Signed-off-by: Sebastian Reichel <sre@kernel.org>
drivers/power/power_supply_core.c

index 8a86cd138de8c91a7496064c068f33bd8b0f028e..ab1cf8bcbefb7f85d2394273791bfd26f844b136 100644 (file)
@@ -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);