diff mbox

[2/2] Timer example error check

Message ID 1409235313-20445-2-git-send-email-petri.savolainen@linaro.org
State New
Headers show

Commit Message

Petri Savolainen Aug. 28, 2014, 2:15 p.m. UTC
Signed-off-by: Petri Savolainen <petri.savolainen@linaro.org>
---
 example/timer/odp_timer_test.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
diff mbox

Patch

diff --git a/example/timer/odp_timer_test.c b/example/timer/odp_timer_test.c
index bf1d7df..67f445d 100644
--- a/example/timer/odp_timer_test.c
+++ b/example/timer/odp_timer_test.c
@@ -195,7 +195,7 @@  static void parse_args(int argc, char *argv[], test_args_t *args)
 	args->core_count    = 0; /* all cores */
 	args->resolution_us = 10000;
 	args->min_us        = args->resolution_us;
-	args->max_us        = 100000000;
+	args->max_us        = 10000000;
 	args->period_us     = 1000000;
 	args->tmo_count     = 30;
 
@@ -347,6 +347,12 @@  int main(int argc, char *argv[])
 				      args.min_us*USEC,
 				      args.max_us*USEC);
 
+	if (test_timer == ODP_TIMER_INVALID) {
+		ODP_ERR("Timer create failed.\n");
+		return -1;
+	}
+
+
 	odp_shm_print_all();
 
 	printf("CPU freq %"PRIu64" hz\n", odp_sys_cpu_hz());