Browse Source

power-supply: Propagate error returned by power_supply_find_supply_from_node()

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>
Viresh Kumar 11 years ago
parent
commit
f5b89affe2
1 changed files with 2 additions and 2 deletions
  1. 2 2
      drivers/power/power_supply_core.c

+ 2 - 2
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);