regulator: max8925: Do not hardcode return value
authorSachin Kamat <sachin.kamat@linaro.org>
Tue, 18 Feb 2014 10:41:01 +0000 (16:11 +0530)
committerMark Brown <broonie@linaro.org>
Wed, 19 Feb 2014 13:08:35 +0000 (22:08 +0900)
Propagate the error value returned by the function instead.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
drivers/regulator/max8925-regulator.c

index 5b939894bfc4e0b9ac7cd482a4f26fcd0ad4bbf9..9c859ed4131b44d6cbf552ae09cca5aef5754ba0 100644 (file)
@@ -264,7 +264,7 @@ static int max8925_regulator_dt_init(struct platform_device *pdev,
                                &max8925_regulator_matches[ridx], 1);
        of_node_put(np);
        if (rcount < 0)
-               return -ENODEV;
+               return rcount;
        config->init_data =     max8925_regulator_matches[ridx].init_data;
        config->of_node = max8925_regulator_matches[ridx].of_node;