From 1ca4d3429cdb0f784055ca58b2d21bba1d54138b Mon Sep 17 00:00:00 2001 From: Liang-Min Larry Wang Date: Wed, 15 Jul 2015 13:22:40 -0400 Subject: [PATCH] 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 --- lib/librte_ether/rte_ethdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) -- 2.20.1