[powerdebug V2: 04/14] check the return value of init_regulator_ds and fix prototype

Daniel Lezcano daniel.lezcano at free.fr
Wed Mar 23 13:37:33 UTC 2011


Signed-off-by: Daniel Lezcano <daniel.lezcano at free.fr>
---
 powerdebug.c |    3 ++-
 powerdebug.h |    2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/powerdebug.c b/powerdebug.c
index 7de6ddd..8d74538 100644
--- a/powerdebug.c
+++ b/powerdebug.c
@@ -185,7 +185,8 @@ int main(int argc, char **argv)
 		return 1;
 	}
 
-	init_regulator_ds();
+	if (init_regulator_ds())
+		return -1;
 
 	while (1) {
 		int key = 0;
diff --git a/powerdebug.h b/powerdebug.h
index 8a3b5bd..8401a84 100644
--- a/powerdebug.h
+++ b/powerdebug.h
@@ -39,8 +39,8 @@ extern double ticktime;
 
 extern void version(void);
 
+extern int init_regulator_ds(void);
 extern void print_regulator_info(int verbose);
-extern void init_regulator_ds(void);
 extern void read_regulator_info(void);
 extern void print_regulator_info(int verbose);
 
-- 
1.7.1




More information about the linaro-dev mailing list