diff mbox

Return correct error code if suplied shm can't contain requested pool

Message ID 1418726293-12668-1-git-send-email-bill.fischofer@linaro.org
State Superseded
Headers show

Commit Message

Bill Fischofer Dec. 16, 2014, 10:38 a.m. UTC
Fixes Bug #1002

Signed-off-by: Bill Fischofer <bill.fischofer@linaro.org>
---
 platform/linux-generic/odp_buffer_pool.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Bill Fischofer Dec. 16, 2014, 10:50 a.m. UTC | #1
This is a fix to Bug #1002 and should be merged as part of the v0.5 tag.
It's a simple type mismatch that was caught when I did my strong typing
experiment a few days ago.  It should have been part of the final buffer
patch but I figured it would be more expedient to post it as a bug fix to
exercise that process.

On Tue, Dec 16, 2014 at 4:38 AM, Bill Fischofer <bill.fischofer@linaro.org>
wrote:
>
> Fixes Bug #1002
>
> Signed-off-by: Bill Fischofer <bill.fischofer@linaro.org>
> ---
>  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 e947dde..4c8b037 100644
> --- a/platform/linux-generic/odp_buffer_pool.c
> +++ b/platform/linux-generic/odp_buffer_pool.c
> @@ -234,7 +234,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 {
> --
> 1.8.3.2
>
>
diff mbox

Patch

diff --git a/platform/linux-generic/odp_buffer_pool.c b/platform/linux-generic/odp_buffer_pool.c
index e947dde..4c8b037 100644
--- a/platform/linux-generic/odp_buffer_pool.c
+++ b/platform/linux-generic/odp_buffer_pool.c
@@ -234,7 +234,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 {