diff mbox

linux-generic: timer fix odp_timer_pool_create return code

Message ID 1461945799-20151-1-git-send-email-maxim.uvarov@linaro.org
State New
Headers show

Commit Message

Maxim Uvarov April 29, 2016, 4:03 p.m. UTC
Accodring to API return code for fail case is ODP_TIMER_POOL_INVALID
and errno set.
https://bugs.linaro.org/show_bug.cgi?id=2139

Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
---
 platform/linux-generic/odp_timer.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox

Patch

diff --git a/platform/linux-generic/odp_timer.c b/platform/linux-generic/odp_timer.c
index ac72709..29383b1 100644
--- a/platform/linux-generic/odp_timer.c
+++ b/platform/linux-generic/odp_timer.c
@@ -787,7 +787,7 @@  odp_timer_pool_create(const char *name,
 	/* Verify that we have a valid (non-zero) timer resolution */
 	if (param->res_ns == 0) {
 		__odp_errno = EINVAL;
-		return NULL;
+		return ODP_TIMER_POOL_INVALID;
 	}
 	odp_timer_pool_t tp = odp_timer_pool_new(name, param);
 	return tp;