Just set the return value, and remove the return() function at the failure branch. https://bugs.linaro.org/show_bug.cgi?id=2933
Signed-off-by: Kevin Wang <[email protected]> Reviewed-by: Ola Liljedahl <[email protected]> Reviewed-by: Brian Brooks <[email protected]> --- platform/linux-generic/pktio/loop.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platform/linux-generic/pktio/loop.c b/platform/linux-generic/pktio/loop.c index 7096283..61e98ad 100644 --- a/platform/linux-generic/pktio/loop.c +++ b/platform/linux-generic/pktio/loop.c @@ -176,7 +176,7 @@ static int loopback_send(pktio_entry_t *pktio_entry, int index ODP_UNUSED, pktio_entry->s.stats.out_octets += bytes; } else { ODP_DBG("queue enqueue failed %i\n", ret); - return -1; + ret = -1; } odp_ticketlock_unlock(&pktio_entry->s.txl); -- 2.7.4
