summaryrefslogtreecommitdiffstats
path: root/drivers/regulator/ti-abb-regulator.c
diff options
context:
space:
mode:
authorSachin Kamat <sachin.kamat@linaro.org>2014-02-18 11:40:58 +0100
committerMark Brown <broonie@linaro.org>2014-02-19 14:06:52 +0100
commit0ab5c85d68505a19ae622d9f6d4cdd79f873570d (patch)
tree3175ec0f98ae5e6d7dea82ae3afaf6a67b65de09 /drivers/regulator/ti-abb-regulator.c
parentregulator: ti-abb-regulator: do not open-code counting and access of dt array... (diff)
downloadlinux-0ab5c85d68505a19ae622d9f6d4cdd79f873570d.tar.xz
linux-0ab5c85d68505a19ae622d9f6d4cdd79f873570d.zip
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.c2
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,
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)) {