[dpdk-dev] [PATCH] ethdev: fix macro VALID_PORTID_OR_ERR_RTE

Liang-Min Larry Wang liang-min.wang at intel.com
Wed Jul 15 19:22:40 CEST 2015


fix return value, using the macro input instead of -EINVAL.

Signed-off-by: Liang-Min Larry Wang <liang-min.wang at intel.com>
---
 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 ddf3658..a957d9a 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.1.0



More information about the dev mailing list