lkml.org 
[lkml]   [2010]   [Nov]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Subject[PATCH 3/3] regulator: Return proper error for regulator_register()
    From
    Date
    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




    \
     
     \ /
      Last update: 2010-11-05 08:27    [W:0.022 / U:30.072 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site