[dpdk-dev] ethdev: fix macro VALID_PORTID_OR_ERR_RTE
Commit Message
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
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
@@ -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)