diff mbox

linux-generic: pool: add odp_pool_capability() rc check

Message ID 20170118220516.28542-1-bill.fischofer@linaro.org
State Accepted
Commit 88dbb00623102878f2e0e1dd720a942fdd980ca3
Headers show

Commit Message

Bill Fischofer Jan. 18, 2017, 10:05 p.m. UTC
Resolve Bug https://bugs.linaro.org/show_bug.cgi?id=2826 by adding
an explicit check of the rc from odp_pool_capability() for consistency
with other code that calls this routine.

Signed-off-by: Bill Fischofer <bill.fischofer@linaro.org>

---
 platform/linux-generic/odp_pool.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

-- 
2.9.3
diff mbox

Patch

diff --git a/platform/linux-generic/odp_pool.c b/platform/linux-generic/odp_pool.c
index 090a55f..3a93554 100644
--- a/platform/linux-generic/odp_pool.c
+++ b/platform/linux-generic/odp_pool.c
@@ -445,7 +445,8 @@  static int check_params(odp_pool_param_t *params)
 {
 	odp_pool_capability_t capa;
 
-	odp_pool_capability(&capa);
+	if (odp_pool_capability(&capa) < 0)
+		return -1;
 
 	switch (params->type) {
 	case ODP_POOL_BUFFER: