aboutsummaryrefslogtreecommitdiff
path: root/sensor.c
diff options
context:
space:
mode:
Diffstat (limited to 'sensor.c')
-rw-r--r--sensor.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sensor.c b/sensor.c
index d63510e..e172f88 100644
--- a/sensor.c
+++ b/sensor.c
@@ -271,12 +271,12 @@ static struct display_ops sensor_ops = {
int sensor_init(void)
{
- if (display_register(SENSOR, &sensor_ops))
- return -1;
-
sensor_tree = tree_load(SYSFS_SENSOR, sensor_filter_cb);
if (!sensor_tree)
return -1;
- return fill_sensor_tree();
+ if (fill_sensor_tree())
+ return -1;
+
+ return display_register(SENSOR, &sensor_ops);
}