diff options
author | Sachin Kamat <sachin.kamat@linaro.org> | 2014-02-18 05:40:58 -0500 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2014-02-19 08:06:52 -0500 |
commit | 0ab5c85d68505a19ae622d9f6d4cdd79f873570d (patch) | |
tree | 3175ec0f98ae5e6d7dea82ae3afaf6a67b65de09 /drivers/regulator/ti-abb-regulator.c | |
parent | 5c24d355dd9af29abb25fb3891122af5e80a551d (diff) |
regulator: ti-abb: Do not hardcode return value
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>
Diffstat (limited to 'drivers/regulator/ti-abb-regulator.c')
-rw-r--r-- | drivers/regulator/ti-abb-regulator.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/regulator/ti-abb-regulator.c b/drivers/regulator/ti-abb-regulator.c index 804c83a31d69..75fa64769b4b 100644 --- a/drivers/regulator/ti-abb-regulator.c +++ b/drivers/regulator/ti-abb-regulator.c | |||
@@ -522,7 +522,7 @@ static int ti_abb_init_table(struct device *dev, struct ti_abb *abb, | |||
522 | num_entries = of_property_count_u32_elems(dev->of_node, pname); | 522 | num_entries = of_property_count_u32_elems(dev->of_node, pname); |
523 | if (num_entries < 0) { | 523 | if (num_entries < 0) { |
524 | dev_err(dev, "No '%s' property?\n", pname); | 524 | dev_err(dev, "No '%s' property?\n", pname); |
525 | return -ENODEV; | 525 | return num_entries; |
526 | } | 526 | } |
527 | 527 | ||
528 | if (!num_entries || (num_entries % num_values)) { | 528 | if (!num_entries || (num_entries % num_values)) { |