mempool/dpaa2: fix error code for allocation failure
authorHemant Agrawal <hemant.agrawal@nxp.com>
Thu, 22 Jun 2017 12:48:07 +0000 (18:18 +0530)
committerThomas Monjalon <thomas@monjalon.net>
Fri, 21 Jul 2017 06:27:58 +0000 (09:27 +0300)
commit6ed4390e5e16ddc836279946591618527cd69544
tree21b064e9617444c85bfc548eebeba0eea9385b86
parent6a60f7de06421db8125c5c8b6d6ab87257c09759
mempool/dpaa2: fix error code for allocation failure

In case the alloc api is not able to allocate the required
number of buffer, it can return '0', which will not indicate
the failure to the calling function.
This patch fix the return value to indicate the failure.

Fixes: 5dc43d22b5ad ("mempool/dpaa2: add hardware offloaded mempool")
Cc: stable@dpdk.org
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Reviewed-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Shreyansh Jain <shreyansh.jain@nxp.com>
drivers/mempool/dpaa2/dpaa2_hw_mempool.c