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

Daniel Lezcano daniel.lezcano at free.fr
Tue Mar 22 11:40:07 UTC 2011


From: Daniel Lezcano <dlezcano at fr.ibm.com>

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

diff --git a/powerdebug.c b/powerdebug.c
index 44f1f02..f2d02c8 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 f351ff2..e194025 100644
--- a/powerdebug.h
+++ b/powerdebug.h
@@ -40,8 +40,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