[dpdk-dev] ethdev: fix macro VALID_PORTID_OR_ERR_RTE

Message ID 1436980960-16028-1-git-send-email-liang-min.wang@intel.com (mailing list archive)
State Accepted, archived
Headers

Commit Message

Liang-Min Larry Wang July 15, 2015, 5:22 p.m. UTC
  fix return value, using the macro input instead of -EINVAL.

Signed-off-by: Liang-Min Larry Wang <liang-min.wang@intel.com>
---
 lib/librte_ether/rte_ethdev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

Thomas Monjalon July 16, 2015, 9:51 p.m. UTC | #1
2015-07-15 13:22, Liang-Min Larry Wang:
> fix return value, using the macro input instead of -EINVAL.
> 
> Signed-off-by: Liang-Min Larry Wang <liang-min.wang@intel.com>

Applied, thanks
  

Patch

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)