aboutsummaryrefslogtreecommitdiff
path: root/regulator.c
diff options
context:
space:
mode:
Diffstat (limited to 'regulator.c')
-rw-r--r--regulator.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/regulator.c b/regulator.c
index 27d75b6..0e1c2c6 100644
--- a/regulator.c
+++ b/regulator.c
@@ -28,6 +28,8 @@
#include <dirent.h>
#include <string.h>
#include <stdlib.h>
+#include <unistd.h>
+
#include "display.h"
#include "powerdebug.h"
#include "tree.h"
@@ -265,7 +267,7 @@ int regulator_init(void)
int ret = 0;
ret = display_register(REGULATOR, &regulator_ops);
- if (!ret)
+ if (ret)
printf("error: regulator display register failed");
if (access(SYSFS_REGULATOR, F_OK))