From 57408e45ba64d287d402da8bd212edc9aa56d1ba Mon Sep 17 00:00:00 2001 From: Bill Fischofer Date: Tue, 16 Dec 2014 04:59:48 -0600 Subject: linux-generic: fix return value in pool_create return correct error result if pool shm cannot be allocated Fix to Bug #1002 Signed-off-by: Bill Fischofer Signed-off-by: Maxim Uvarov --- platform/linux-generic/odp_buffer_pool.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platform/linux-generic/odp_buffer_pool.c b/platform/linux-generic/odp_buffer_pool.c index a44f350b7..48be24f80 100644 --- a/platform/linux-generic/odp_buffer_pool.c +++ b/platform/linux-generic/odp_buffer_pool.c @@ -237,7 +237,7 @@ odp_buffer_pool_t odp_buffer_pool_create(const char *name, ODP_PAGE_SIZE, 0); if (shm == ODP_SHM_INVALID) { POOL_UNLOCK(&pool->s.lock); - return ODP_BUFFER_INVALID; + return ODP_BUFFER_POOL_INVALID; } pool->s.pool_base_addr = odp_shm_addr(shm); } else { -- cgit v1.2.3