mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-11 15:49:56 +00:00
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>
This commit is contained in:
parent
5c24d355dd
commit
0ab5c85d68
@ -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);
|
num_entries = of_property_count_u32_elems(dev->of_node, pname);
|
||||||
if (num_entries < 0) {
|
if (num_entries < 0) {
|
||||||
dev_err(dev, "No '%s' property?\n", pname);
|
dev_err(dev, "No '%s' property?\n", pname);
|
||||||
return -ENODEV;
|
return num_entries;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!num_entries || (num_entries % num_values)) {
|
if (!num_entries || (num_entries % num_values)) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user