aboutsummaryrefslogtreecommitdiff
path: root/regulator.c
diff options
context:
space:
mode:
Diffstat (limited to 'regulator.c')
-rw-r--r--regulator.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/regulator.c b/regulator.c
index 849f906..e9b01bb 100644
--- a/regulator.c
+++ b/regulator.c
@@ -236,12 +236,12 @@ static struct display_ops regulator_ops = {
int regulator_init(void)
{
- if (display_register(REGULATOR, &regulator_ops))
- return -1;
-
reg_tree = tree_load(SYSFS_REGULATOR, regulator_filter_cb);
if (!reg_tree)
return -1;
- return fill_regulator_tree();
+ if (fill_regulator_tree())
+ return -1;
+
+ return display_register(REGULATOR, &regulator_ops);
}