Messages in this thread Patch in this message | | | Subject | [PATCH 3/3] regulator: Return proper error for regulator_register() | From | Axel Lin <> | Date | Fri, 05 Nov 2010 15:27:17 +0800 |
| |
Signed-off-by: Axel Lin <axel.lin@gmail.com> --- drivers/regulator/core.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c index 0dd9a57..59a7119 100644 --- a/drivers/regulator/core.c +++ b/drivers/regulator/core.c @@ -2346,6 +2346,7 @@ struct regulator_dev *regulator_register(struct regulator_desc *regulator_desc, if (init_data->supply_regulator && init_data->supply_regulator_dev) { dev_err(dev, "Supply regulator specified by both name and dev\n"); + ret = -EINVAL; goto scrub; } @@ -2364,6 +2365,7 @@ struct regulator_dev *regulator_register(struct regulator_desc *regulator_desc, if (!found) { dev_err(dev, "Failed to find supply %s\n", init_data->supply_regulator); + ret = -ENODEV; goto scrub; } -- 1.7.2
| |