From: Liang-Min Larry Wang Date: Wed, 15 Jul 2015 17:22:40 +0000 (-0400) Subject: ethdev: fix error returned for invalid port id X-Git-Tag: spdx-start~8725 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=1ca4d3429cdb0f784055ca58b2d21bba1d54138b;p=dpdk.git ethdev: fix error returned for invalid port id Fix return value, using the macro input instead of -EINVAL. Fixes: 75acd57ad025 ("ethdev: introduce valid port helper") Signed-off-by: Liang-Min Larry Wang Acked-by: Thomas Monjalon --- diff --git a/lib/librte_ether/rte_ethdev.c b/lib/librte_ether/rte_ethdev.c index ddf365899a..a957d9a2fb 100644 --- a/lib/librte_ether/rte_ethdev.c +++ b/lib/librte_ether/rte_ethdev.c @@ -111,7 +111,7 @@ #define VALID_PORTID_OR_ERR_RET(port_id, retval) do { \ if (!rte_eth_dev_is_valid_port(port_id)) { \ PMD_DEBUG_TRACE("Invalid port_id=%d\n", port_id); \ - return -EINVAL; \ + return retval; \ } \ } while (0)