regulator: ti-abb: Do not hardcode return value
authorSachin Kamat <sachin.kamat@linaro.org>
Tue, 18 Feb 2014 10:40:58 +0000 (16:10 +0530)
committerMark Brown <broonie@linaro.org>
Wed, 19 Feb 2014 13:06:52 +0000 (22:06 +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/ti-abb-regulator.c

index 804c83a31d695b00ed483273003eb7d4c25a529b..75fa64769b4bde55cd6bf69df21e7ffa12d50d8a 100644 (file)
@@ -522,7 +522,7 @@ static int ti_abb_init_table(struct device *dev, struct ti_abb *abb,
        num_entries = of_property_count_u32_elems(dev->of_node, pname);
        if (num_entries < 0) {
                dev_err(dev, "No '%s' property?\n", pname);
-               return -ENODEV;
+               return num_entries;
        }
 
        if (!num_entries || (num_entries % num_values)) {